mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-12-03 18:17:12 +00:00
21 lines
514 B
TypeScript
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();
|
|
});
|
|
});
|