Skip to content

Commit 609db6f

Browse files
committed
Simple test
1 parent eafd4da commit 609db6f

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

src/__tests__/Price.test.ts

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,18 @@ test('Price', (done) => {
2323
connection.getAccountInfo(mapping.productAccountKeys[0]).then((accountInfo) => {
2424
if (accountInfo && accountInfo.data) {
2525
const product = parseProductData(accountInfo.data)
26-
if (product.priceAccountKey) {
27-
connection.getAccountInfo(product.priceAccountKey).then((accountInfo) => {
28-
if (accountInfo && accountInfo.data) {
29-
const price = parsePriceData(accountInfo.data)
30-
console.log(product.product.symbol)
31-
console.log(price)
32-
expect(price.magic).toBe(Magic)
33-
expect(price.version).toBe(Version)
34-
done()
35-
} else {
36-
done('No price accountInfo')
37-
}
38-
})
39-
} else {
40-
done('Product account has price account')
41-
}
26+
connection.getAccountInfo(product.priceAccountKey!).then((accountInfo) => {
27+
if (accountInfo && accountInfo.data) {
28+
const price = parsePriceData(accountInfo.data)
29+
console.log(product.product.symbol)
30+
console.log(price)
31+
expect(price.magic).toBe(Magic)
32+
expect(price.version).toBe(Version)
33+
done()
34+
} else {
35+
done('No price accountInfo')
36+
}
37+
})
4238
} else {
4339
done('No product accountInfo')
4440
}

0 commit comments

Comments
 (0)