Skip to content

Commit

Permalink
test: update remaining tap asserts
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
KernelDeimos committed Sep 20, 2024
1 parent 2386d80 commit ce22bd9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function checkServerIsRunning(url, msg, t, _cb) {
}

function tearDown(ps, t) {
t.tearDown(() => {
t.teardown(() => {
ps.kill('SIGTERM');
});
}
Expand Down
4 changes: 2 additions & 2 deletions test/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ test('http-server main', (t) => {
requestAsync("http://localhost:8080/").then(res => {
t.ok(res);
t.equal(res.statusCode, 200);
t.includes(res.body, './file');
t.includes(res.body, './canYouSeeMe');
t.match(res.body, './file');
t.match(res.body, './canYouSeeMe');

// Custom headers
t.equal(res.headers['access-control-allow-origin'], '*');
Expand Down
2 changes: 1 addition & 1 deletion test/process-env-port.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function startServer(url, port, t) {
});
} else {
ecstatic.on('exit', (evt) => {
t.notEqual(evt.code, 0, 'err:Running on invalid port not allowed');
t.not(evt.code, 0, 'err:Running on invalid port not allowed');
});
}
}
Expand Down

0 comments on commit ce22bd9

Please sign in to comment.