Skip to content

πŸ“ˆ Get real-time stocks from TradingView

Improve tests

Mathieu Colmon062cfe5dbf09
diff --git a/tests/customChartTypes.test.ts b/tests/customChartTypes.test.ts
index d73c920..314871f 100644
--- a/tests/customChartTypes.test.ts
+++ b/tests/customChartTypes.test.ts
@@ -78,6 +78,7 @@ describe('CustomChartTypes', () => {
) await utils.wait(100);
expect(chart.infos.full_name).toBe('BINANCE:BTCEUR');
+ expect(chart.periods.length).toBeGreaterThan(0);
});
it('sets chart type to Kagi', async () => {
@@ -100,7 +101,7 @@ describe('CustomChartTypes', () => {
) await utils.wait(100);
expect(chart.infos.full_name).toBe('BINANCE:ETHEUR');
- expect(chart.periods.length).toBe(100);
+ expect(chart.periods.length).toBeGreaterThan(0);
});
it('sets chart type to PointAndFigure', async () => {
diff --git a/tests/simpleChart.test.ts b/tests/simpleChart.test.ts
index 1649eec..6dac65b 100644
--- a/tests/simpleChart.test.ts
+++ b/tests/simpleChart.test.ts
@@ -61,6 +61,7 @@ describe('Simple chart session', async () => {
console.log('Chart type set');
expect(chart.infos.full_name).toBe('BINANCE:ETHEUR');
+ expect(chart.periods.length).toBeGreaterThan(0);
});
it('closes chart', async () => {