-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Make JS code hint test runs more consistent #5904
Conversation
Previously, the web worker would be restarted at somewhat random times during test runs (after a specific number of hints was requested). This change forces the worker to start afresh with each test and switches the worker so that it doesn't reset during any of the tests.
Assigned to me |
@@ -778,6 +782,9 @@ define(function (require, exports, module) { | |||
*/ | |||
function postMessage(msg) { | |||
addFilesPromise.done(function (ternWorker) { | |||
if (config.debug) { | |||
console.debug("Sending message", msg); |
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.
Nit. Looks like console.debug
is deprecated. https://developer.mozilla.org/en-US/docs/Web/API/console
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 Chrome docs don't say that, though it sounds identical to regular .log() there too... https://developers.google.com/chrome-developer-tools/docs/console
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.
Yeah, Firebug hasn't deprecated console.debug
either. I kind of liked debug because Chrome shows the debug messages in blue, making them a bit easier to pick out.
Initial review complete |
@jasonsanjose I've just pushed a commit that addresses the comments. The only one I didn't directly address is the |
Err, just looked at my todo list and realized that I have another change to make ( |
OK, updated |
Looks good. Merging. |
Make JS code hint test runs more consistent
I changed the resetting behavior for code hint tests to eliminate uncertainty that is causing some test failures. This change also adds some scaffolding that makes it easier to track down JS code hint issues.
Hopefully fixes #5754. This definitely fixes #5811.