From b2b830f8d4429edc3b88ae594604bd8517666fde Mon Sep 17 00:00:00 2001 From: Johann-S Date: Thu, 2 May 2024 12:29:55 +0200 Subject: [PATCH] fix(tests): use same tsconfig file --- tests/client.ts | 15 ++++++++------- tsconfig.json | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/client.ts b/tests/client.ts index 30ddd3d..92eb229 100644 --- a/tests/client.ts +++ b/tests/client.ts @@ -1,16 +1,17 @@ +/* eslint-disable no-console */ import parseDuration from 'parse-duration'; -import { KuCoinWs } from '../src/index'; -import { delay } from '../src/util'; +import { KuCoinWs } from '../src/index.js'; +import { delay } from '../src/util.js'; const main = async () => { const client = new KuCoinWs(); - client.on('error', data => console.error(data)); - client.on('reconnect', log => console.log(log)); - client.on('subscriptions', subList => console.log(`subscriptions: ${subList.length}`)); - const unSubFn = client.on('ticker-BTC/USDT', tickerBtc => console.log(tickerBtc)); - client.on('candle-BTC/USDT-1m', candleBtc => console.log(candleBtc)); + client.on('error', (data) => console.error(data)); + client.on('reconnect', (log) => console.log(log)); + client.on('subscriptions', (subList) => console.log(`subscriptions: ${subList.length}`)); + const unSubFn = client.on('ticker-BTC/USDT', (tickerBtc) => console.log(tickerBtc)); + client.on('candle-BTC/USDT-1m', (candleBtc) => console.log(candleBtc)); await client.connect(); client.subscribeTickers(['BTC/USDT', 'ETH/USDT']); diff --git a/tsconfig.json b/tsconfig.json index a13996b..1d89e60 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,6 +12,6 @@ "skipLibCheck": true, "typeRoots": ["./node_modules/@types"] }, - "include": ["src/**/*"], + "include": ["src/**/*", "tests/**/*"], "exclude": ["node_modules"] }