Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
runs-on: ubuntu-latest

strategy:
# TradingView authenticated tests use the same account/session secrets.
# Running every Node matrix job at once makes the external websocket tests flaky.
max-parallel: 1
matrix:
node-version: [14.x, 18.x, 19.x]

Expand Down
8 changes: 6 additions & 2 deletions tests/indicators.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ describe('Indicators', () => {

const lastResult: any = await new Promise((resolve) => {
CipherB.onUpdate(() => {
resolve(CipherB.periods[0]);
const lastPeriod = CipherB.periods[0];

if (lastPeriod?.VWAP !== undefined && lastPeriod?.rsiMFI !== undefined) {
resolve(lastPeriod);
}
});
});

Expand All @@ -135,7 +139,7 @@ describe('Indicators', () => {
expect(lastResult.Buy_and_sell_circle).toBeTypeOf('number');

CipherB.remove();
});
}, 30000);

it.skipIf(noAuth)('removes chart', () => {
console.log('Closing the chart...');
Expand Down
Loading