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
|
||||
});
|
@ -6,8 +6,12 @@
|
||||
|
||||
export const url = 'http://localhost:8899/';
|
||||
|
||||
//export const url = 'http://edge.testnet.solana.com:8899/';
|
||||
//export const url = 'http://beta.edge.testnet.solana.com:8899/';
|
||||
/*
|
||||
export const url = 'http://edge.testnet.solana.com:8899/';
|
||||
export const url = 'http://beta.testnet.solana.com:8899/';
|
||||
export const url = 'http://testnet.solana.com:8899/';
|
||||
|
||||
//export const url = 'http://testnet.solana.com:8899/';
|
||||
//export const url = 'https://api.testnet.solana.com/';
|
||||
export const url = 'https://api.edge.testnet.solana.com/';
|
||||
export const url = 'https://api.beta.testnet.solana.com/';
|
||||
export const url = 'https://api.testnet.solana.com/';
|
||||
*/
|
||||
|
Reference in New Issue
Block a user