Created
November 26, 2017 21:36
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const baz = () => {}; | |
const bar = () => {}; | |
bar.exportTest = true; | |
export bar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { bar } from './foo.js'; | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment