Files
api/packages/rpc-provider/src/ws/state.spec.ts
T
2022-01-01 09:28:18 +02:00

19 lines
449 B
TypeScript

// Copyright 2017-2022 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { WsProvider } from './';
describe('state', (): void => {
it('requires an ws:// prefixed endpoint', (): void => {
expect(
() => new WsProvider('http://', 0)
).toThrow(/with 'ws/);
});
it('allows wss:// endpoints', (): void => {
expect(
() => new WsProvider('wss://', 0)
).not.toThrow();
});
});