chore: migrate tests to typescript
This commit is contained in:
committed by
Justin Starry
parent
f912c63b22
commit
8ada44456d
18
web3.js/test/cluster.test.ts
Normal file
18
web3.js/test/cluster.test.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import {expect} from 'chai';
|
||||
|
||||
import {clusterApiUrl} from '../src/util/cluster';
|
||||
|
||||
describe('Cluster Util', () => {
|
||||
it('invalid', () => {
|
||||
expect(() => {
|
||||
clusterApiUrl('abc123' as any);
|
||||
}).to.throw();
|
||||
});
|
||||
|
||||
it('devnet', () => {
|
||||
expect(clusterApiUrl()).to.eq('https://devnet.solana.com');
|
||||
expect(clusterApiUrl('devnet')).to.eq('https://devnet.solana.com');
|
||||
expect(clusterApiUrl('devnet', true)).to.eq('https://devnet.solana.com');
|
||||
expect(clusterApiUrl('devnet', false)).to.eq('http://devnet.solana.com');
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user