Gathering detailed insights and metrics for gulp-mocha-co
Gathering detailed insights and metrics for gulp-mocha-co
npm install gulp-mocha-co
Typescript
Module System
Min. Node Version
NPM Version
43.4
Supply Chain
83.6
Quality
68.6
Maintenance
25
Vulnerability
97.2
License
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
49,676
Last Day
1
Last Week
6
Last Month
55
Last Year
602
Minified
Minified + Gzipped
Latest Version
0.4.1-co.3
Package Id
gulp-mocha-co@0.4.1-co.3
Size
1.89 kB
NPM Version
1.4.3
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
-77.8%
6
Compared to previous week
Last Month
61.8%
55
Compared to previous month
Last Year
-43.6%
602
Compared to previous year
This gulp plugin is based on Sindre Sorhus gulp-mocha plugin, but pointing to mocha-co
In order to have your tests running with mocha-co you need to launch gulp with the ES6 flag '--harmony'
You can do it with
node --harmony `which gulp`
or creating an alias
alias gulp='node --harmony `which gulp`'
Then you can run your tasks as normal
gulp test
Install with npm
npm install --save-dev gulp-mocha-co
1var gulp = require('gulp'); 2var mocha = require('gulp-mocha-co'); 3 4gulp.task('default', function () { 5 gulp.src('test.js') 6 .pipe(mocha({reporter: 'nyan'})); 7});
1 2describe('My test with generators', function(){ 3 before(function *(){ 4 yield whatever.doSomething() 5 }); 6 7 beforeEach(function*(){ 8 var returnedThing = yield whatever.returnWhatever() 9 }); 10 11 it('Should have the things', function*(){ 12 var thingsExist = yield parser.checkIfThingsExist(); 13 expect(thingsExist).to.equals(true); 14 }); 15}); 16
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
Type: String
Default: bdd
Values: bdd
, tdd
, qunit
, exports
The interface to use.
Type: String
Default: dot
Values: reporters
The reporter that will be used.
This option can also be used to utilize third-party reporters. For example if you npm install mocha-lcov-reporter
you can then do use mocha-lcov-reporter
as value.
Type: Array
Accepted globals.
Type: Number
Default: 2000
Test-case timeout in milliseconds.
Type: Boolean
Default: false
Bail on the first test failure.
Type: Boolean
Default: false
Ignore global leaks.
Type: String
Only run tests matching the given pattern which is internally compiled to a RegExp.
Based on Sindre Sorhus work MIT © Sindre Sorhus
No vulnerabilities found.
No security vulnerabilities found.