fix: add testnetChannelEndpoint()

This commit is contained in:
Michael Vines
2018-12-19 19:28:28 -08:00
parent b5d058e88f
commit 62c1efc955
8 changed files with 69 additions and 14 deletions

View File

@@ -0,0 +1,18 @@
// @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
});