Skip to content

Commit 60cf5ec

Browse files
committed
test: update remaining tap asserts
After the previous changes there were a few lingering asserts that didn't match the names in the newest version of tap. These were relatively trivial to fix, although interestingly the meaning of the 'includes' synonym changed at some point from "match" to "has"; these tests were written at the time "includes" meant "match".
1 parent b6f1b1e commit 60cf5ec

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

test/cli.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function checkServerIsRunning(url, msg, t, _cb) {
3434
}
3535

3636
function tearDown(ps, t) {
37-
t.tearDown(() => {
37+
t.teardown(() => {
3838
ps.kill('SIGTERM');
3939
});
4040
}

test/main.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ test('http-server main', (t) => {
5757
requestAsync("http://localhost:8080/").then(res => {
5858
t.ok(res);
5959
t.equal(res.statusCode, 200);
60-
t.includes(res.body, './file');
61-
t.includes(res.body, './canYouSeeMe');
60+
t.match(res.body, './file');
61+
t.match(res.body, './canYouSeeMe');
6262

6363
// Custom headers
6464
t.equal(res.headers['access-control-allow-origin'], '*');

test/process-env-port.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function startServer(url, port, t) {
4040
});
4141
} else {
4242
ecstatic.on('exit', (evt) => {
43-
t.notEqual(evt.code, 0, 'err:Running on invalid port not allowed');
43+
t.not(evt.code, 0, 'err:Running on invalid port not allowed');
4444
});
4545
}
4646
}

0 commit comments

Comments
 (0)