Skip to content

Instantly share code, notes, and snippets.

@victorb
Created September 14, 2016 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victorb/d7b8c091be59a6597c58fe0978cc0ddf to your computer and use it in GitHub Desktop.
Save victorb/d7b8c091be59a6597c58fe0978cc0ddf to your computer and use it in GitHub Desktop.
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