fix: use Node.js https agent when endpoint uses https (#12692)

This commit is contained in:
Justin Starry
2020-10-07 00:41:18 +08:00
committed by GitHub
parent a5c6a78f6d
commit 41ce892f1c
4 changed files with 36 additions and 10 deletions

View File

@ -2515,3 +2515,14 @@ test('root notification', async () => {
expect(roots[1]).toBeGreaterThan(roots[0]);
await connection.removeRootChangeListener(subscriptionId);
});
test('https request', async () => {
if (mockRpcEnabled) {
console.log('non-live test skipped');
return;
}
const connection = new Connection('https://devnet.solana.com');
const version = await connection.getVersion();
expect(version['solana-core']).toBeTruthy();
});