Open m4rvr opened 3 years ago
@MarvinRudolph Thanks! As mentioned on Twitter DMs, we are going to use uvu
instead of Jest. The other PR was already merged so we should adapt this PR to the new structure.
@m3hari How should we handle unit tests like the ones in this PR? Also in test/specs
or somewhere else? 🤔
Apologies for the late reply, I think unit tests are better placed next to the file to be tested. uvu
should find it with minor changes on the test command. Here is the docs for uvu test file matching
@m3hari Thanks!
@MarvinRudolph Do you want to transform this to use uvu? For example, if you want to test utils/html.ts
then the spec can be located next to it, in utils/html.unit.ts
or utils/html.spec.ts
.
This PR adds some basic unit test setup with jest + esbuild-jest. Currently, only a few utils are tested. Also, the
test
script/command needs to be run manually.