Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out how to test the index.js #9

Open
tarkatronic opened this issue Jun 16, 2020 · 0 comments
Open

Figure out how to test the index.js #9

tarkatronic opened this issue Jun 16, 2020 · 0 comments
Labels
help wanted Extra attention is needed question Further information is requested testing

Comments

@tarkatronic
Copy link
Member

I'm not really sure what the conventions are in the JS world for this. In Python you would put all executing code inside functions and then have something like:

if __name__ == "__main__":
    main()

There are some interesting ideas here: https://stackoverflow.com/questions/27634634/nodejs-how-to-test-index-js-without-module-exports
I'm not sure I entirely like them though. This will probably need more investigation to figure out a good pattern.

@tarkatronic tarkatronic added help wanted Extra attention is needed question Further information is requested testing labels Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested testing
Projects
None yet
Development

No branches or pull requests

1 participant