Files
pezkuwi-api/packages/rpc-provider/src/ws/state.spec.ts
T
2026-10-08 03:23:10 +04:00

21 lines
514 B
TypeScript

// Copyright 2017-2026 @pezkuwi/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
import { WsProvider } from './index.js';
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();
});
});