Skip to content

Instantly share code, notes, and snippets.

@jonathaningram
Created November 26, 2017 21:36
Show Gist options
  • Save jonathaningram/c26459e403a3de2f5e942cfc249516a8 to your computer and use it in GitHub Desktop.
Save jonathaningram/c26459e403a3de2f5e942cfc249516a8 to your computer and use it in GitHub Desktop.
A potential convention for exporting things from a JS module whose only purpose is to be unit-tested (i.e. not meant to be used publicly)
export const baz = () => {};
const bar = () => {};
bar.exportTest = true;
export bar;
import { bar } from './foo.js';
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment