1 | // Copyright 2017-2018 @polkadot/api-provider authors & contributors
|
2 | // This software may be modified and distributed under the terms
|
3 | // of the ISC license. See the LICENSE file for details.
|
4 |
|
5 | import Ws from './index';
|
6 |
|
7 | describe('state', () => {
|
8 | it('requires an ws:// prefixed endpoint', () => {
|
9 | expect(
|
10 | () => new Ws('http://', false)
|
11 | ).toThrow(/with 'ws/);
|
12 | });
|
13 |
|
14 | it('allows wss:// endpoints', () => {
|
15 | expect(
|
16 | () => new Ws('wss://', false)
|
17 | ).not.toThrow();
|
18 | });
|
19 | });
|