Closed tribou closed 8 years ago
Not sure if it's the cause but maybe you should wait for the callback to return before marking the test as done, you might be undoing the stub a bit too early.
This is an issue with not handling the error event: https://github.com/nodejs/node/blob/master/lib/_http_client.js#L259
I am guessing its an issue in superagent or how its being used with sinon.
@geek, you were correct. This was an issue with the superagent package which was fixed by visionmedia/superagent@454eeb2.
The updated test at tribou/whatlyric@4a167111d781c5180633ebde6ac5e942fe5a6f49 no longer throws an error.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
I can't determine if this is an issue with lab, sinon, or my implementation (probably the latter).
I'm receiving the following double callback error even though all tests appear to complete successfully:
I've skipped the test for now, but this is the script:
Here's the line that's causing the issue in the context of the project: https://github.com/tribou/whatlyric/blob/master/web/react/utils/WhatLyricAPI_test.js#L41
When inspecting the sinon
firstCall.stack
error for the stub, it has this:The only similar issue I could find that involved the runner and timers was Feature - Prevent clobbered timer globals from interfering with runner.
If there's a better implementation for this test, I'm definitely open to suggestions.