Facet-MUD-Project/facetjs

Figure out how to test the `index.js`

オープン

#9 opened on 2020/06/16

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (0 件のフォーク)auto 404
help wantedquestiontesting

Repository metrics

Stars
 (1 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド