Skip to content

Commit

Permalink
Fix check() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu2301 committed Apr 22, 2023
1 parent e33d709 commit b433bec
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/10. Authenticated.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,9 @@ module.exports = async (log, success, warn, err, cb) => {

const checked = new Set();
async function check(item) {
await wait(1000);

checked.add(item);
if (checked.size < userIndicators.length + 1) {
log('Waiting for', userIndicators.length + 1 - checked.size, 'item(s)...');
return;
}
log('Checked:', [...checked], `(${checked.size}/${userIndicators.length + 1})`);
if (checked.size < userIndicators.length + 1) return;

log('Closing client...');
chart.delete();
Expand All @@ -74,7 +70,7 @@ module.exports = async (log, success, warn, err, cb) => {
price: chart.periods[0].close,
});

await check(Symbol('PRICE'));
await check(Symbol.for('PRICE'));
});

await wait(1000);
Expand Down

0 comments on commit b433bec

Please sign in to comment.