Skip to content

Commit 6a8c717

Browse files
committed
Test fixes (courtesy of @ajbogh).
1 parent fc10b71 commit 6a8c717

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/cli.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ describe('command line usage', function() {
1717
it('--version', function(done) {
1818
exec_test([ "--version" ], function(error, stdout, stdin) {
1919
assert(!error, error);
20-
assert(stdout.indexOf("live-server") == 0, "version not found");
20+
assert(stdout.indexOf("live-server") === 0, "version not found");
2121
done();
2222
});
2323
});
2424
it('--help', function(done) {
2525
exec_test([ "--help" ], function(error, stdout, stdin) {
2626
assert(!error, error);
27-
assert(stdout.indexOf("Usage: live-server") == 0, "usage not found");
27+
assert(stdout.indexOf("Usage: live-server") === 0, "usage not found");
2828
done();
2929
});
3030
});
@@ -38,15 +38,15 @@ describe('command line usage', function() {
3838
it('--port', function(done) {
3939
exec_test([ "--port=16123", "--no-browser", "--test" ], function(error, stdout, stdin) {
4040
assert(!error, error);
41-
assert(stdout.indexOf("Serving") == 0, "serving string not found");
41+
assert(stdout.indexOf("Serving") >= 0, "serving string not found");
4242
assert(stdout.indexOf("at http://127.0.0.1:16123") != -1, "port string not found");
4343
done();
4444
});
4545
});
4646
it('--host', function(done) {
4747
exec_test([ "--host=localhost", "--no-browser", "--test" ], function(error, stdout, stdin) {
4848
assert(!error, error);
49-
assert(stdout.indexOf("Serving") == 0, "serving string not found");
49+
assert(stdout.indexOf("Serving") >= 0, "serving string not found");
5050
assert(stdout.indexOf("at http://localhost:") != -1, "host string not found");
5151
done();
5252
});
@@ -58,7 +58,7 @@ describe('command line usage', function() {
5858
"--test"
5959
], function(error, stdout, stdin) {
6060
assert(!error, error);
61-
assert(stdout.indexOf("Serving") == 0, "serving string not found");
61+
assert(stdout.indexOf("Serving") >= 0, "serving string not found");
6262
done();
6363
});
6464
});

0 commit comments

Comments
 (0)