Skip to content

Commit a3092d2

Browse files
committed
Fix unreachable error code.
1 parent cbf4933 commit a3092d2

File tree

2 files changed

+3
-26
lines changed

2 files changed

+3
-26
lines changed

packages/rules-unit-testing/test/dummy.test.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

packages/rules-unit-testing/test/impl/discovery.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ describe('discoverEmulators()', () => {
6767
expect(emulators).to.deep.equal({});
6868
});
6969

70-
it('throws error if host is unreachable', async () => {
71-
// connect to port:0 should always fail
70+
it('throws error if emulator hub is unreachable', async () => {
71+
// Connect to port:0. Should always fail (although error codes may differ among OSes).
7272
await expect(
7373
discoverEmulators({ host: '127.0.0.1', port: 0 })
74-
).to.be.rejectedWith(/EADDRNOTAVAIL/);
74+
).to.be.rejectedWith(/EADDRNOTAVAIL|ECONNREFUSED/);
7575
});
7676

7777
it('throws if response status is not 2xx', async () => {

0 commit comments

Comments
 (0)