Skip to content

Commit

Permalink
Test fixes (courtesy of @ajbogh).
Browse files Browse the repository at this point in the history
  • Loading branch information
tapio committed Nov 26, 2018
1 parent fc10b71 commit 6a8c717
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ describe('command line usage', function() {
it('--version', function(done) {
exec_test([ "--version" ], function(error, stdout, stdin) {
assert(!error, error);
assert(stdout.indexOf("live-server") == 0, "version not found");
assert(stdout.indexOf("live-server") === 0, "version not found");
done();
});
});
it('--help', function(done) {
exec_test([ "--help" ], function(error, stdout, stdin) {
assert(!error, error);
assert(stdout.indexOf("Usage: live-server") == 0, "usage not found");
assert(stdout.indexOf("Usage: live-server") === 0, "usage not found");
done();
});
});
Expand All @@ -38,15 +38,15 @@ describe('command line usage', function() {
it('--port', function(done) {
exec_test([ "--port=16123", "--no-browser", "--test" ], function(error, stdout, stdin) {
assert(!error, error);
assert(stdout.indexOf("Serving") == 0, "serving string not found");
assert(stdout.indexOf("Serving") >= 0, "serving string not found");
assert(stdout.indexOf("at http://127.0.0.1:16123") != -1, "port string not found");
done();
});
});
it('--host', function(done) {
exec_test([ "--host=localhost", "--no-browser", "--test" ], function(error, stdout, stdin) {
assert(!error, error);
assert(stdout.indexOf("Serving") == 0, "serving string not found");
assert(stdout.indexOf("Serving") >= 0, "serving string not found");
assert(stdout.indexOf("at http://localhost:") != -1, "host string not found");
done();
});
Expand All @@ -58,7 +58,7 @@ describe('command line usage', function() {
"--test"
], function(error, stdout, stdin) {
assert(!error, error);
assert(stdout.indexOf("Serving") == 0, "serving string not found");
assert(stdout.indexOf("Serving") >= 0, "serving string not found");
done();
});
});
Expand Down

0 comments on commit 6a8c717

Please sign in to comment.