Skip to content
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

test: Change equal to strictEqual and pass delay to setTimeout #9938

Closed

Conversation

qualquervalor2
Copy link

@qualquervalor2 qualquervalor2 commented Dec 1, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change
  • Changed assert.equal to assert.strictEqual
  • Passed a delay value to setTimeout

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@mscdex mscdex added the domain Issues and PRs related to the domain subsystem. label Dec 1, 2016
@imyller imyller added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Dec 1, 2016
@@ -26,7 +26,7 @@ function err() {
console.error('This should not happen.');
disposalFailed = true;
process.exit(1);
});
}, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qualquervalor2 Could you check if this works with setImmediate() instead of setTimeout()?

If it doesn't work, could you change the 0 to a 1? The 0 becomes a 1 under the hood so it would be better to be explicit up front. :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setImediate() did not work. Updated the PR to use 1.

@@ -26,7 +26,7 @@ function err() {
console.error('This should not happen.');
disposalFailed = true;
process.exit(1);
});
}, 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can likely be changed to use common.mustCall() ... for instance:

    setTimeout(common.mustCall(() => {}, 0), 1);

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mhdawson
Copy link
Member

mhdawson commented Dec 6, 2016

@jasnell
Copy link
Member

jasnell commented Dec 7, 2016

@Fishrock123 ... are you good with this now?

Trott pushed a commit to Trott/io.js that referenced this pull request Dec 7, 2016
change equal to strictEqual, fix setTimeout

PR-URL: nodejs#9938
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
@Trott
Copy link
Member

Trott commented Dec 7, 2016

Landed in 25dfb8e

@Trott Trott closed this Dec 7, 2016
@Trott
Copy link
Member

Trott commented Dec 7, 2016

Thanks for the contribution! 🎉

addaleax pushed a commit that referenced this pull request Dec 8, 2016
change equal to strictEqual, fix setTimeout

PR-URL: #9938
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
addaleax pushed a commit to addaleax/node that referenced this pull request Dec 8, 2016
change equal to strictEqual, fix setTimeout

PR-URL: nodejs#9938
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
@italoacasas italoacasas mentioned this pull request Dec 15, 2016
MylesBorins pushed a commit that referenced this pull request Dec 20, 2016
change equal to strictEqual, fix setTimeout

PR-URL: #9938
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
change equal to strictEqual, fix setTimeout

PR-URL: #9938
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
change equal to strictEqual, fix setTimeout

PR-URL: #9938
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This was referenced Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. domain Issues and PRs related to the domain subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.