Skip to content

Commit

Permalink
fix(tests): use same tsconfig file
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann-S committed May 2, 2024
1 parent 2abab23 commit b2b830f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions tests/client.ts
Original file line number Diff line number Diff line change
@@ -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']);
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"skipLibCheck": true,
"typeRoots": ["./node_modules/@types"]
},
"include": ["src/**/*"],
"include": ["src/**/*", "tests/**/*"],
"exclude": ["node_modules"]
}

0 comments on commit b2b830f

Please sign in to comment.