Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need test coverage report #257

Open
sqfasd opened this issue Aug 24, 2018 · 0 comments
Open

need test coverage report #257

sqfasd opened this issue Aug 24, 2018 · 0 comments

Comments

@sqfasd
Copy link
Member

sqfasd commented Aug 24, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant