Facet-MUD-Project/facetjs

Figure out how to test the `index.js`

开放

#9 创建于 2020年6月16日

 (0 条评论) (0 个反应) (0 位负责人)TypeScript (0 个派生)auto 404
help wantedquestiontesting

仓库指标

星标
 (1 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南