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: refactoring test-repl-tab-complete with common.mustCall #2122

Conversation

thefourtheye
Copy link
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
Contributor

cjihrig commented Jul 7, 2015

LGTM if the CI is happy.

@thefourtheye
Copy link
Contributor Author

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

@cjihrig
Copy link
Contributor

cjihrig commented Jul 7, 2015

@mscdex mscdex 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
Contributor Author

@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
Contributor

cjihrig commented Jul 7, 2015

Thanks, landed in 180fd39.

@cjihrig cjihrig closed this Jul 7, 2015
@thefourtheye thefourtheye deleted the refactor-repl-tab-complete-test-case branch July 7, 2015 16:17
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 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.

3 participants