Skip to content

Commit a1a1352

Browse files
committed
Make intentional failure unit test more widely compatible
On Mac (maybe elsewhere) this fails with an aggregate error of IPv6 + IPv4 errors, so the message is empty. Checking the code should be more compatible everywhere I think.
1 parent 32a96d8 commit a1a1352

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/unit-tests.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ describe("Usbmux-client unit tests", () => {
133133

134134
const deviceQueryResult = await client.getDevices().catch(e => e);
135135
expect(deviceQueryResult).to.be.instanceOf(Error);
136-
expect(deviceQueryResult.message).to.contain("ECONNREFUSED");
136+
expect(deviceQueryResult.code).to.equal("ECONNREFUSED");
137137

138138
await startServer(port);
139139

0 commit comments

Comments
 (0)