-
Notifications
You must be signed in to change notification settings - Fork 150
Open
Labels
Description
We need a test coverage tool that can cover the codes behind the http protocol, because now we have only integration tests most of which interact with the asch server through http protocol.
It's still difficult to write unit test for asch core modules because of the mediocre design.
Fortunately, nyc is just right for the situation, it only needs the backend service run in the same process with the test framework.
For example:
we can get coverage report using the following command
nyc npm test
While the npm test is short for:
LOG_LEVEL=error jest --globalSetup ./test/integration/setup.js --globalTeardown ./test/integration/teardown.js ./test/integration
The asch backend service will be started in setup.js
Seed https://github.com/istanbuljs/nyc for more details.