test: refactor test-repl-tab-complete
authorSakthipriyan Vairamani <thechargingvolcano@gmail.com>
Tue, 7 Jul 2015 13:31:17 +0000 (19:01 +0530)
committercjihrig <cjihrig@gmail.com>
Tue, 7 Jul 2015 16:08:39 +0000 (12:08 -0400)
commit180fd392ca65cf754f761bc0ce6d5a75f0982b7a
treef109f27fa0e5d6d7f8c0f7bb5af634e85294cd78
parent84b39157646fd9ebf818b5f662bdc8b79ac20412
test: refactor test-repl-tab-complete

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: https://github.com/nodejs/io.js/pull/2122
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
test/parallel/test-repl-tab-complete.js