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

modified test-repl-persistent-history to use common.mustCall #12703

Closed
wants to merge 1 commit into from

Conversation

cool88
Copy link
Contributor

@cool88 cool88 commented Apr 27, 2017

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

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Apr 27, 2017
@@ -212,7 +206,10 @@ function cleanupTmpFile() {

// Copy our fixture to the tmp directory
fs.createReadStream(historyFixturePath)
.pipe(fs.createWriteStream(historyPath)).on('unpipe', () => runTest());
.pipe(fs.createWriteStream(historyPath)).on('unpipe', runTest);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you leave this as it was please.

Copy link
Contributor Author

@cool88 cool88 May 2, 2017

Choose a reason for hiding this comment

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

I'll do so. I removed the function because this way runTest was accounting for an additional call. I thought it'd be an extra burden on the reader if he sees common.mustCall(runTest, numtests + 1) later on. Sorry, this was my first contribution on the git via NodeTodo, I am figuring out how to undo these changes as recommended.

.pipe(fs.createWriteStream(historyPath)).on('unpipe', () => runTest());
.pipe(fs.createWriteStream(historyPath)).on('unpipe', runTest);

// redefine runTest function that uses common.mustCall (https://github.com/nodejs/node/tree/master/test#mustcallfn-expected)
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment can be dropped.

@mscdex mscdex added the repl Issues and PRs related to the REPL subsystem. label Apr 27, 2017
@Fishrock123 Fishrock123 self-assigned this Apr 27, 2017
Copy link
Contributor

@Fishrock123 Fishrock123 left a comment

Choose a reason for hiding this comment

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

I seem to recall not having done this for some specific reason but now I'm not sure what it was if it was anything...

.pipe(fs.createWriteStream(historyPath)).on('unpipe', runTest);

// redefine runTest function that uses common.mustCall (https://github.com/nodejs/node/tree/master/test#mustcallfn-expected)
runTest = common.mustCall(runTest, numtests);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please name the wrapped version something else and update the call points respectively?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you please look at it now? Thank you. I hope it was Ok to --amend this change?

Copy link
Member

Choose a reason for hiding this comment

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

I hope it was Ok to --amend this change?

Yeah that's fine

@cool88 cool88 force-pushed the master branch 2 times, most recently from 9549df3 to ef63593 Compare May 2, 2017 18:17
@Trott
Copy link
Member

Trott commented May 5, 2017

This LGTM if CI is green. Ping @cjihrig @Fishrock123

@Trott
Copy link
Member

Trott commented May 5, 2017

Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

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

LGTM if CI is green

@addaleax addaleax dismissed stale reviews from cjihrig and Fishrock123 May 7, 2017 21:07

addressed

@addaleax
Copy link
Member

addaleax commented May 7, 2017

Landed in 6058c43, thanks for the PR! :)

@addaleax addaleax closed this May 7, 2017
addaleax pushed a commit that referenced this pull request May 7, 2017
PR-URL: #12703
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
anchnk pushed a commit to anchnk/node that referenced this pull request May 19, 2017
PR-URL: nodejs#12703
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@jasnell jasnell mentioned this pull request May 11, 2017
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
3 tasks
gibfahn pushed a commit that referenced this pull request Jun 20, 2017
PR-URL: #12703
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
PR-URL: #12703
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@MylesBorins MylesBorins mentioned this pull request Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repl Issues and PRs related to the REPL subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants