-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Separating nyc from the integration tests for Node #6430
Conversation
nyc is obscuring Mocha's stack traces. It's unable to follow through the references. This is the fastest fix, and this will incidentally make our Node tests faster. Fixes Azure#6298
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good change since we're not using coverage data at the moment.
I'd prefer not to remove the coverage information from the If the intention here is to help with debugging, then I would suggest we make use of the
My suggestion would be to make the Thoughts? |
To me In past projects we've had a |
Said another way, instead of |
Thank you all for contributing! The good thing is that there's no rush on merging this PR, so we can wait until we all agree on something. |
@@ -43,7 +43,9 @@ | |||
"unit-test:browser": "cross-env TEST_MODE=playback npm run integration-test:browser", | |||
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", | |||
"unit-test": "npm run unit-test:node && npm run unit-test:browser", | |||
"emulator-tests": "cross-env STORAGE_CONNECTION_STRING=UseDevelopmentStorage=true && npm run test:node" | |||
"emulator-tests": "cross-env STORAGE_CONNECTION_STRING=UseDevelopmentStorage=true && npm run test:node", | |||
"coverage-integration-test:node": "nyc npm run integration-test:node", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the code coverage report look similar before and after this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code coverage report looks the same as long as, after this change, you do coverage-integration-test:node
to get the coverage 🌞
The canonical names for the various scripts are documented in the CONTRIBUTING.md here: https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md#other-npm-scripts. All projects MUST have those scripts defined in their package.json. Guidelines for how the conventional scripts are used by the engineering system are documented in our JavaScript OneNote under Guidelines > |
@@ -64,7 +64,9 @@ | |||
"test": "npm run build:test && npm run unit-test && npm run integration-test", | |||
"unit-test:browser": "cross-env TEST_MODE=playback npm run integration-test:browser", | |||
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", | |||
"unit-test": "npm run unit-test:node && npm run unit-test:browser" | |||
"unit-test": "npm run unit-test:node && npm run unit-test:browser", | |||
"coverage-integration-test:node": "nyc npm run integration-test:node", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should take it as a priority and fix the code coverage configs.
Better to have this coverage-integration-test:node
step in the CI for nightly tests than integration-test:node
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spent about two days trying to fix this problem via configuration files and I couldn't do it. I could have missed something. If you find time, try to fix this via Nyc, Istanbul or Mocha configurations, and let me know if you find a way. I would love to go through that approach if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, configs are hard, we have issues logged.
nyc is obscuring Mocha's stack traces. It's unable to follow through the references. This is the fastest fix (probably by days of separation from the next fastest fix), and this will incidentally make our Node tests faster.
Fixes #6298