solana/web3.js/test/testnet.test.js
2020-06-14 21:57:04 -07:00

19 lines
370 B
JavaScript

// @flow
import {testnetChannelEndpoint} from '../src/util/testnet';
test('invalid', () => {
expect(() => {
testnetChannelEndpoint('abc123');
}).toThrow();
});
test('edge', () => {
expect(testnetChannelEndpoint('edge')).toEqual(
'https://api.edge.testnet.solana.com',
);
});
test('default', () => {
testnetChannelEndpoint(); // Should not throw
});