Skip to content

Commit df9d613

Browse files
committed
fix: update tests for --private-network-access
PR #801 was merged. This PR has tests written for an older version of `tap`, so these tests must now be updated. The breaking change in `tap` is: > `t.ifError()` => `t.error()`
1 parent 5c25529 commit df9d613

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/private-network-access.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test('private-network-access defaults to false', (t) => {
2424
const uri = `http://localhost:${port}/subdir/index.html`;
2525

2626
request.get({ uri }, (err, res) => {
27-
t.ifError(err);
27+
t.error(err);
2828
t.equal(res.statusCode, 200);
2929
t.type(res.headers['access-control-allow-private-network'], 'undefined');
3030
});
@@ -51,7 +51,7 @@ test('privateNetworkAccess set to false', (t) => {
5151
const uri = `http://localhost:${port}/subdir/index.html`;
5252

5353
request.get({ uri }, (err, res) => {
54-
t.ifError(err);
54+
t.error(err);
5555
t.equal(res.statusCode, 200);
5656
t.type(res.headers['access-control-allow-private-network'], 'undefined');
5757
});
@@ -77,7 +77,7 @@ test('privateNetworkAccess set to true', (t) => {
7777
const port = httpServer.address().port;
7878
const uri = `http://localhost:${port}/subdir/index.html`;
7979
request.get({ uri }, (err, res) => {
80-
t.ifError(err);
80+
t.error(err);
8181
t.equal(res.statusCode, 200);
8282
t.equal(res.headers['access-control-allow-private-network'], 'true');
8383
});

0 commit comments

Comments
 (0)