-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Labels
Milestone
Description
@jpettitt reported this while running the following test:
amphtml/extensions/amp-user-notification/0.1/test/test-amp-user-notification.js
Lines 80 to 88 in 97847f2
| it('should require an id', () => { | |
| const el = getUserNotification({ | |
| 'data-show-if-href': 'https://www.ampproject.org/get/here', | |
| 'data-dismiss-href': 'https://www.ampproject.org/post/here', | |
| 'layout': 'nodisplay', | |
| }); | |
| const impl = el.implementation_; | |
| expect(impl.buildCallback.bind(impl)).to.throw(/should have an id/); | |
| }); |
The error at the end of the test gets thrown asynchronously, by which time the test has completed. So Mocha makes it look like the test has passed, but the thrown error prevents it from running subsequent tests.
See mochajs/mocha#3223 and mochajs/mocha#3257 for more info on why this is a mocha problem.
Reactions are currently unavailable