fix: add testnetChannelEndpoint()
This commit is contained in:
18
web3.js/test/testnet.test.js
Normal file
18
web3.js/test/testnet.test.js
Normal 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
|
||||
});
|
Reference in New Issue
Block a user