Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
cressie176 committed Sep 7, 2023
1 parent 1371ec3 commit df16b9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { ok, strictEqual: eq, rejects } = require('node:assert');
const { ok, match, strictEqual: eq, rejects } = require('node:assert');
const { before, afterEach, describe, it } = require('zunit');
const Scanner = require('../lib/Scanner');
const Database = require('./utils/Database');
Expand Down Expand Up @@ -37,7 +37,7 @@ describe('PG Scanner', () => {
scanner = new Scanner({ host: 'doesnotexist', port: 1111, user: 'bob' });

await rejects(() => scanner.connect(), (err) => {
eq(err.message, 'Error connecting to doesnotexist:1111 as bob: getaddrinfo ENOTFOUND doesnotexist');
match(err.message, /Error connecting to doesnotexist:1111 as bob: getaddrinfo .* doesnotexist/);
eq(err.code, 'ERR_PG_SCANNER_CONNECTION_ERROR');
eq(err.cause.code, 'ENOTFOUND');
return true;
Expand Down

0 comments on commit df16b9f

Please sign in to comment.