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: cleanup test-fs-watch.js #12595

Closed
wants to merge 1 commit into from

Conversation

RobotMermaid
Copy link
Contributor

Reversed "actual" and "expected" arguments for assert.strictEqual().

Replaced constructor with regular expression for assert.throws().

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Apr 22, 2017
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

LGTM with a question.

oldhandle.close(); // clean up

assert.throws(function() {
const w = fs.watchFile(__filename, {persistent: false}, common.noop);
oldhandle = w._handle;
w._handle = { stop: w._handle.stop };
w.stop();
}, TypeError);
}, /^TypeError: Illegal invocation/);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this have a $ on the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes - oops

Copy link
Contributor

@mscdex mscdex Apr 22, 2017

Choose a reason for hiding this comment

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

@cjihrig I would say so.

@mscdex mscdex added the fs Issues and PRs related to the fs subsystem / file system. label Apr 22, 2017
@bengl bengl added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Apr 22, 2017
@mscdex
Copy link
Contributor

mscdex commented Apr 22, 2017

@jasnell
Copy link
Member

jasnell commented Apr 24, 2017

This will need to be rebased before landing.
@RobotMermaid ... let us know if you're not quite sure how to do the rebasing and one of us will help walk you through it.

Reversed "actual" and "expected" arguments for assert.strictEqual().

Replaced constructor with regular expression for assert.throws().
@Trott
Copy link
Member

Trott commented Apr 25, 2017

Since the conflict was with a PR of mine that landed, I went ahead and did the rebase. Pushed to the branch here, so it should be all set to go. Another CI probably wouldn't hurt, though.

@Trott
Copy link
Member

Trott commented Apr 25, 2017

Trott pushed a commit to Trott/io.js that referenced this pull request Apr 26, 2017
Reversed "actual" and "expected" arguments for assert.strictEqual().

Replaced constructor with regular expression for assert.throws().

PR-URL: nodejs#12595
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@Trott
Copy link
Member

Trott commented Apr 26, 2017

Landed in b65d5e4.
Thanks for the contribution! 🎉

@Trott Trott closed this Apr 26, 2017
@evanlucas evanlucas mentioned this pull request May 1, 2017
evanlucas pushed a commit that referenced this pull request May 1, 2017
Reversed "actual" and "expected" arguments for assert.strictEqual().

Replaced constructor with regular expression for assert.throws().

PR-URL: #12595
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
evanlucas pushed a commit that referenced this pull request May 2, 2017
Reversed "actual" and "expected" arguments for assert.strictEqual().

Replaced constructor with regular expression for assert.throws().

PR-URL: #12595
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
evanlucas pushed a commit that referenced this pull request May 2, 2017
Reversed "actual" and "expected" arguments for assert.strictEqual().

Replaced constructor with regular expression for assert.throws().

PR-URL: #12595
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
MylesBorins pushed a commit that referenced this pull request May 15, 2017
Reversed "actual" and "expected" arguments for assert.strictEqual().

Replaced constructor with regular expression for assert.throws().

PR-URL: #12595
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
MylesBorins pushed a commit that referenced this pull request May 18, 2017
Reversed "actual" and "expected" arguments for assert.strictEqual().

Replaced constructor with regular expression for assert.throws().

PR-URL: #12595
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
MylesBorins pushed a commit that referenced this pull request May 18, 2017
Reversed "actual" and "expected" arguments for assert.strictEqual().

Replaced constructor with regular expression for assert.throws().

PR-URL: #12595
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@MylesBorins MylesBorins mentioned this pull request May 23, 2017
andrew749 pushed a commit to michielbaird/node that referenced this pull request Jul 19, 2017
Reversed "actual" and "expected" arguments for assert.strictEqual().

Replaced constructor with regular expression for assert.throws().

PR-URL: nodejs/node#12595
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
andrew749 pushed a commit to michielbaird/node that referenced this pull request Jul 19, 2017
Reversed "actual" and "expected" arguments for assert.strictEqual().

Replaced constructor with regular expression for assert.throws().

PR-URL: nodejs/node#12595
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
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. fs Issues and PRs related to the fs subsystem / file system. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants