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

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)
test/parallel/test-repl-persistent-history.js Outdated
@@ -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);

This comment has been minimized.

Copy link
@cjihrig

cjihrig Apr 27, 2017

Contributor

Could you leave this as it was please.

This comment has been minimized.

Copy link
@cool88

cool88 May 2, 2017

Author Contributor

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.

test/parallel/test-repl-persistent-history.js Outdated
.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)

This comment has been minimized.

Copy link
@cjihrig

cjihrig Apr 27, 2017

Contributor

This comment can be dropped.

@mscdex mscdex added the repl label Apr 27, 2017

@Fishrock123 Fishrock123 self-assigned this Apr 27, 2017

@Fishrock123
Copy link
Member

left a comment

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...

test/parallel/test-repl-persistent-history.js Outdated
.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);

This comment has been minimized.

Copy link
@Fishrock123

Fishrock123 Apr 27, 2017

Member

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

This comment has been minimized.

Copy link
@cool88

cool88 May 2, 2017

Author Contributor

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

This comment has been minimized.

Copy link
@gibfahn

gibfahn May 5, 2017

Member

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

Yeah that's fine

@cool88 cool88 force-pushed the cool88:master branch 2 times, most recently May 2, 2017

@cool88 cool88 force-pushed the cool88:master branch to fe611f5 May 2, 2017

@Trott

This comment has been minimized.

Copy link
Member

commented May 5, 2017

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

@Trott

This comment has been minimized.

Copy link
Member

commented May 5, 2017

@Trott
Trott approved these changes May 5, 2017
Copy link
Member

left a comment

LGTM if CI is green

@jasnell
jasnell approved these changes May 7, 2017

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

addressed

@addaleax

This comment has been minimized.

Copy link
Member

commented May 7, 2017

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

@addaleax addaleax closed this May 7, 2017

addaleax added a commit that referenced this pull request May 7, 2017
test: refactored test-repl-persistent-history
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
test: refactored test-repl-persistent-history
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 referenced this pull request May 11, 2017
@gibfahn gibfahn referenced this pull request Jun 15, 2017
2 of 3 tasks complete
gibfahn added a commit that referenced this pull request Jun 20, 2017
test: refactored test-repl-persistent-history
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 added a commit that referenced this pull request Jul 11, 2017
test: refactored test-repl-persistent-history
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 referenced this pull request Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.