Closed sfriedle closed 1 year ago
@florian-h05 Shall we merge and close this pull request? The contained tests cover nearly all JavaScript files in the root directory. I can open new pull requests when I continue to write tests for the remaining files in subdirectories, like items
, things
, etc.
I‘ll have a final look later, but I am very happy with merging this first PR!
Relates to #166
Description
This PR adds unit tests to the existing codebase. Until now there are only two unit tests, written with Mocha. The newly added tests use Jest as testing framework. To distinguish between the Mocha and Jest tests, we use this filename pattern:
*.test.js
*.spec.js
The tests can be run with this commands:
npm run test
runs all tests and lints the sources.npm run test:mocha
runs the existing Mocha tests.npm run test:jest
runs the new Jest tests.