Closed
Description
How best to approach this?
test.cb('2 callbacks', t => {
t.plan(2);
const alice = new Alice();
alice.on('connect', () => {
t.pass();
t.end(); //?
});
const bob = new Bob();
bob.on('connect', () => {
t.pass();
t.end(); //?
});
});
There is no guarantee which connect callback will be called first, but I need to assert that both got called. Promise.all could solve this but are there any alternatives?
Metadata
Metadata
Assignees
Labels
No labels