Created
September 14, 2016 15:00
-
-
Save victorb/d7b8c091be59a6597c58fe0978cc0ddf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let clients = {} | |
before(function (done) { | |
fc = new FactoryClient() | |
fc.spawnNode((err, node) => { | |
expect(err).to.not.exist | |
if (err) done(err) | |
clients.a = node | |
}) | |
fc.spawnNode((err, node) => { | |
expect(err).to.not.exist | |
if (err) done(err) | |
clients.b = node | |
}) | |
const interval = setInterval(() => { | |
if (Object.keys(clients).length === 2) { | |
clearInterval(interval) | |
done() | |
} | |
}, 100) | |
}) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment