TestFramework - davidkhala/node-utils GitHub Wiki
Mocha
Why Mocha
- No configuration required
- Smart align to nodejs (esm)
Why not mocha
ts-mocha
is not recognized by Webstorm- No simple way to configure for mocha test framework for Typescript
- https://github.com/davidkhala/ts-template/issues/1
JEST
- default test folder:
__tests__
. see in https://jestjs.io/docs/configuration#testregex-string--arraystring
Why Jest
- It takes care both nodejs and typescript
- It is widely used in Meta
Why not Jest
- ECMAScript Modules is disabled by default
- under Preview (06-Apr-2023)
ViTest
supertest
HTTP assertions
- powered by superagent.
Notes
- Replace
assert.equal
withassert.strictEqual