chore: migrate tests to typescript

This commit is contained in:
Justin Starry
2021-03-15 13:08:10 +08:00
committed by Justin Starry
parent f912c63b22
commit 8ada44456d
27 changed files with 242 additions and 825 deletions

View 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');
});
});