feat: add getVersion method
This commit is contained in:
committed by
Michael Vines
parent
979a707c94
commit
f3d9ab75e6
@ -475,6 +475,25 @@ test('get recent blockhash', async () => {
|
||||
expect(feeCalculator.lamportsPerSignature).toBeGreaterThanOrEqual(0);
|
||||
});
|
||||
|
||||
test('getVersion', async () => {
|
||||
const connection = new Connection(url);
|
||||
|
||||
mockRpc.push([
|
||||
url,
|
||||
{
|
||||
method: 'getVersion',
|
||||
params: [],
|
||||
},
|
||||
{
|
||||
error: null,
|
||||
result: {'solana-core': '0.20.4'},
|
||||
},
|
||||
]);
|
||||
|
||||
const version = await connection.getVersion();
|
||||
expect(version['solana-core']).toBeTruthy();
|
||||
});
|
||||
|
||||
test('request airdrop', async () => {
|
||||
const account = new Account();
|
||||
const connection = new Connection(url, 'recent');
|
||||
|
Reference in New Issue
Block a user