Skip to content

test: refactoring test-repl-tab-complete with common.mustCall - #2122

Closed
thefourtheye wants to merge 1 commit into
nodejs:masterfrom
thefourtheye:refactor-repl-tab-complete-test-case
Closed

test: refactoring test-repl-tab-complete with common.mustCall#2122
thefourtheye wants to merge 1 commit into
nodejs:masterfrom
thefourtheye:refactor-repl-tab-complete-test-case

Conversation

@thefourtheye

Copy link
Copy Markdown
Contributor

The original test uses a variable to explicitly count how many times
the callback is invoked. This patch uses common.mustCall to track
if the callback is called or not. This would make the test more robust
as we don't explicitly hardcode the number of times to be called.

cc @cjihrig

The original test uses a variable to explicitly count how many times
the callback is invoked. This patch uses `common.mustCall` to track
if the callback is called or not. This would make the test more robust
as we don't explicitly hardcode the number of times to be called.
@cjihrig

Copy link
Copy Markdown
Contributor

LGTM if the CI is happy.

@thefourtheye

Copy link
Copy Markdown
ContributorAuthor

@cjihrig Thanks :-) Can you please trigger a CI run?

@cjihrig

Copy link
Copy Markdown
Contributor

@mscdexmscdex added repl Issues and PRs related to the REPL subsystem. test Issues and PRs related to the tests. labels Jul 7, 2015
@thefourtheye

Copy link
Copy Markdown
ContributorAuthor

@cjihrig Looks like the failures are not because of this change. This test passes in all the environments :-)

cjihrig pushed a commit that referenced this pull request Jul 7, 2015
The original test uses a variable to explicitly count how many
times the callback is invoked. This patch uses common.mustCall()
to track if the callback is called or not. This makes the test
more robust, as we don't explicitly hardcode the number of times
to be called.
PR-URL: #2122
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@cjihrig

Copy link
Copy Markdown
Contributor

Thanks, landed in 180fd39.

@cjihrigcjihrig closed this Jul 7, 2015
@thefourtheye
thefourtheye deleted the refactor-repl-tab-complete-test-case branch July 7, 2015 16:17
@Fishrock123Fishrock123 mentioned this pull request Jul 9, 2015
mscdex pushed a commit to mscdex/io.js that referenced this pull request Jul 9, 2015
The original test uses a variable to explicitly count how many
times the callback is invoked. This patch uses common.mustCall()
to track if the callback is called or not. This makes the test
more robust, as we don't explicitly hardcode the number of times
to be called.
PR-URL: nodejs#2122
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

replIssues and PRs related to the REPL subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@thefourtheye@cjihrig@mscdex