Skip to content

πŸ“ˆ Get real-time stocks from TradingView

Fix a test

Mathieu Colmon2d3f9a05edb5
diff --git a/src/miscRequests.js b/src/miscRequests.js
index b8ca27f..77e17cb 100644
--- a/src/miscRequests.js
+++ b/src/miscRequests.js
@@ -10,10 +10,9 @@ const builtInIndicList = [];
async function fetchScanData(tickers = [], type = '', columns = []) {
const { data } = await axios.post(`https://scanner.tradingview.com/${type}/scan`, {
- validateStatus,
symbols: { tickers },
columns,
- });
+ }, { validateStatus });
return data;
}
diff --git a/tests/search.test.ts b/tests/search.test.ts
index 0ad8bac..ffbfb28 100644
--- a/tests/search.test.ts
+++ b/tests/search.test.ts
@@ -34,7 +34,7 @@ describe('Technical Analysis', () => {
checkTA(await (await searchMarket('BINANCE:BTCUSD'))[0].getTA());
});
- it('gets TA for NASDAQ:AAPL', async () => {
- checkTA(await (await searchMarket('NASDAQ:AAPL'))[0].getTA());
+ it('gets TA for "NASDAQ APPLE"', async () => {
+ checkTA(await (await searchMarket('NASDAQ APPLE'))[0].getTA());
});
});