Skip to content

Commit b433bec

Browse files
committed
Fix check() function
1 parent e33d709 commit b433bec

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests/10. Authenticated.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,9 @@ module.exports = async (log, success, warn, err, cb) => {
5151

5252
const checked = new Set();
5353
async function check(item) {
54-
await wait(1000);
55-
5654
checked.add(item);
57-
if (checked.size < userIndicators.length + 1) {
58-
log('Waiting for', userIndicators.length + 1 - checked.size, 'item(s)...');
59-
return;
60-
}
55+
log('Checked:', [...checked], `(${checked.size}/${userIndicators.length + 1})`);
56+
if (checked.size < userIndicators.length + 1) return;
6157

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

77-
await check(Symbol('PRICE'));
73+
await check(Symbol.for('PRICE'));
7874
});
7975

8076
await wait(1000);

0 commit comments

Comments
 (0)