Skip to content

Commit f36a951

Browse files
committed
improve test
1 parent db99ead commit f36a951

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/echo.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Echo from '../src/echo';
2-
import {PusherConnector} from "../src/connector";
2+
import {NullConnector, PusherConnector} from "../src/connector";
33

44
describe('Echo', () => {
55
test('it will not throw error for supported driver', () => {
@@ -11,15 +11,12 @@ describe('Echo', () => {
1111
'Broadcaster string pusher is not supported.'
1212
);
1313

14-
expect(() => new Echo({ broadcaster: PusherConnector })).not.toThrowError(
15-
'Broadcaster string pusher is not supported.'
16-
);
17-
1814
expect(() => new Echo({ broadcaster: 'socket.io' })).not.toThrowError(
1915
'Broadcaster string socket.io is not supported.'
2016
);
2117

2218
expect(() => new Echo({ broadcaster: 'null' })).not.toThrowError('Broadcaster string null is not supported.');
19+
expect(() => new Echo({ broadcaster: NullConnector })).not.toThrowError();
2320

2421
// eslint-disable-next-line
2522
// @ts-ignore

0 commit comments

Comments
 (0)