gulp-mocha-co
Advanced tools
Comparing version 0.4.1-co.2 to 0.4.1-co.3
{ | ||
"name": "gulp-mocha-co", | ||
"version": "0.4.1-co.2", | ||
"version": "0.4.1-co.3", | ||
"description": "Run Mocha tests with co generators", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -53,3 +53,3 @@ ## Information | ||
beforeEach(function(){ | ||
beforeEach(function*(){ | ||
var returnedThing = yield whatever.returnWhatever() | ||
@@ -65,4 +65,18 @@ }); | ||
``` | ||
## Alternative | ||
Btw, you can just keep using gulp-mocha and good ol mocha and add this code to your tests: | ||
``` | ||
var co = require('co'); | ||
// .... | ||
it('should work', function(done){ | ||
co(function *(){ | ||
yield whatever; | ||
})(done) | ||
}) | ||
```` | ||
See [this issue](https://github.com/visionmedia/mocha/issues/1032) | ||
## API | ||
@@ -69,0 +83,0 @@ |
4079
146