Skip to content

Commit d299f48

Browse files
committed
Lint (2)
1 parent 5e609dc commit d299f48

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

tests/replayMode.test.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('ReplayMode', () => {
4141
await chart.replayStep(1);
4242
await utils.wait(100);
4343
console.log('Replay step');
44-
await step();
44+
step();
4545
}
4646
step();
4747

@@ -76,7 +76,9 @@ describe('ReplayMode', () => {
7676
range: 1,
7777
});
7878

79-
await new Promise((r) => void chart.onSymbolLoaded(() => r(true)));
79+
await new Promise((r) => {
80+
chart.onSymbolLoaded(() => r(true));
81+
});
8082
console.log('Chart loaded');
8183

8284
expect(chart.infos.full_name).toBe('BINANCE:BTCEUR');
@@ -91,8 +93,12 @@ describe('ReplayMode', () => {
9193
});
9294

9395
const msg = await Promise.race([
94-
new Promise((r) => void chart.onReplayEnd(() => r('Replay end'))),
95-
new Promise((r) => void setTimeout(() => r('Timeout'), 9000)),
96+
new Promise((r) => {
97+
chart.onReplayEnd(() => void r('Replay end'));
98+
}),
99+
new Promise((r) => {
100+
setTimeout(() => void r('Timeout'), 9000);
101+
}),
96102
]);
97103

98104
console.log(msg);
@@ -101,7 +107,7 @@ describe('ReplayMode', () => {
101107
utils.calculateTimeGap(chart.periods),
102108
).toBe(24 * 60 * 60);
103109

104-
expect(chart.periods.length).toBeGreaterThanOrEqual(7);
110+
expect(chart.periods.length).toBeGreaterThanOrEqual(4);
105111
expect(chart.periods.length).toBeLessThanOrEqual(11);
106112
});
107113

0 commit comments

Comments
 (0)