Add test to check if backtest behavior changed
This commit is contained in:
@@ -4,7 +4,7 @@ import {getClientForAddress, getPositionHistoryImpl} from '../../src/plugins/cus
|
||||
|
||||
test('GMX get position history - Closed positions with actual PnL', async (t) => {
|
||||
await t.test('should get closed positions with actual GMX PnL data', async () => {
|
||||
const sdk = await getClientForAddress('0xb54a2f65d79bded20f9cbd9a1f85c3855ec3c210')
|
||||
const sdk = await getClientForAddress('0x987b67313ee4827FE55e1FBcd8883D3bb0Bde83b')
|
||||
|
||||
const result = await getPositionHistoryImpl(
|
||||
sdk,
|
||||
@@ -50,7 +50,7 @@ test('GMX get position history - Closed positions with actual PnL', async (t) =>
|
||||
})
|
||||
|
||||
await t.test('should get closed positions with date range', async () => {
|
||||
const sdk = await getClientForAddress('0xb54a2f65D79bDeD20F9cBd9a1F85C3855EC3c210')
|
||||
const sdk = await getClientForAddress('0x987b67313ee4827FE55e1FBcd8883D3bb0Bde83b')
|
||||
|
||||
// Get positions from the last 1 hour
|
||||
const toDate = new Date()
|
||||
@@ -89,7 +89,7 @@ test('GMX get position history - Closed positions with actual PnL', async (t) =>
|
||||
})
|
||||
|
||||
await t.test('should verify PnL data is suitable for reconciliation', async () => {
|
||||
const sdk = await getClientForAddress('0xb54a2f65d79bded20f9cbd9a1f85c3855ec3c210')
|
||||
const sdk = await getClientForAddress('0x987b67313ee4827FE55e1FBcd8883D3bb0Bde83b')
|
||||
|
||||
const result = await getPositionHistoryImpl(sdk, 0, 5)
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { test } from 'node:test'
|
||||
import {test} from 'node:test'
|
||||
import assert from 'node:assert'
|
||||
import { getClientForAddress, getGmxPositionsImpl } from '../../src/plugins/custom/gmx'
|
||||
import {getClientForAddress, getGmxPositionsImpl} from '../../src/plugins/custom/gmx'
|
||||
|
||||
test('GMX get positions', async (t) => {
|
||||
await t.test('should get positions', async () => {
|
||||
const sdk = await getClientForAddress('0x932167388dD9aad41149b3cA23eBD489E2E2DD78')
|
||||
const sdk = await getClientForAddress('0x987b67313ee4827FE55e1FBcd8883D3bb0Bde83b')
|
||||
|
||||
const result = await getGmxPositionsImpl(
|
||||
sdk
|
||||
|
||||
Reference in New Issue
Block a user