Skip to content

Instantly share code, notes, and snippets.

@jedireza
Last active August 29, 2015 14:06
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 jedireza/bb11d812c30f1e3d480f to your computer and use it in GitHub Desktop.
Save jedireza/bb11d812c30f1e3d480f to your computer and use it in GitHub Desktop.
lab.experiment('kittens', function () {
var resultsOfAsync;
lab.before(function (done) {
// set the value
resultsOfAsync = 'awesome stuff';
// Wait 1 second
setTimeout(function () { done(); }, 1000);
});
lab.beforeEach(function (done) {
// Run before every single test
done();
});
lab.test('check that value', function (done) {
//use it
Lab.expect(resultsOfAsync).to.equal('awesome stuff');
done();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment