Last active
August 29, 2015 14:06
-
-
Save jedireza/bb11d812c30f1e3d480f 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
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