Skip to content

Commit 57955f3

Browse files
committed
Fix typo
1 parent 7163d00 commit 57955f3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { clusterApiUrl, Connection } from '@solana/web3.js'
2+
import { getPythProgramKeyForCluster, PythHttpClient } from '..'
3+
4+
test('PythHttpClientCall', (done) => {
5+
jest.setTimeout(20000)
6+
try {
7+
const programKey = getPythProgramKeyForCluster('testnet')
8+
const currentConnection = new Connection(clusterApiUrl('testnet'))
9+
const pyth_client = new PythHttpClient(currentConnection, programKey)
10+
pyth_client.getData().then(
11+
(result) => {
12+
try {
13+
// Find a product with symbol "SOL/USD"
14+
const products = result.products.filter((p) => p.symbol === 'Crypto.SOL/USD')
15+
expect(products.length).toBeGreaterThan(0)
16+
17+
done()
18+
} catch (cerr) {
19+
done(cerr)
20+
}
21+
},
22+
(err) => done(err),
23+
)
24+
} catch (err_catch) {
25+
done(err_catch)
26+
}
27+
})

0 commit comments

Comments
 (0)