Created
July 1, 2015 12:04
-
-
Save lennym/6fd6dc4e0e47c75a8c13 to your computer and use it in GitHub Desktop.
mocha async setup example
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
| var getApp = require('./main'); | |
| describe('App Tests', function () { | |
| var app; | |
| beforeEach(function (done) { | |
| getApp(function (err, a) { | |
| app = a; | |
| done(err); | |
| }) | |
| }); | |
| it('now has access to app', function () { | |
| app.should.be.ok; | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As simple as this is, it really helped me get the concept and apply it. Thank you!