-
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
Update to mocha 7 #8108
Update to mocha 7 #8108
Conversation
I think this fixes #5697 as well |
@@ -57,8 +57,10 @@ describe("FileClient", () => { | |||
}); | |||
|
|||
afterEach(async function() { | |||
await shareClient.delete(); | |||
recorder.stop(); | |||
if (!this.currentTest?.isPending()) { |
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.
Why this?
afterEach
would anyway be executed only after the current test ends, right?
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.
Well issuing a delete breaks the recording, since the test was skipped and we didn't record that operation. We could also blanketly re-record everything, but it feels weird to do cleanup on skipped tests
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.
Ah, got the problem...
Previously, afterEach was skipped if the test is skipped, but with mocha@7.0.0, afterEach gets executed even if the test is skipped.
This is fine here, we can fix these in a followup issue.. #8110
/azp run js - servicebus - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run js - eventhubs-client - tests |
No pipelines are associated with this pull request. |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run js - storage-blob - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Assuming all the checks are green(even the live tests)..!
Thanks to @HarshaNalluru in #7931 we now can upgrade Mocha to the latest version.
Fixes #7932