Switch test frameworks to mocha, expect and istanbul#99
Switch test frameworks to mocha, expect and istanbul#99phated merged 6 commits intogulpjs:masterfrom sttk:use_mocha_and_expect
Conversation
|
Changes Unknown when pulling 445395c on sttk:use_mocha_and_expect into ** on gulpjs:master**. |
|
Changes Unknown when pulling 87c3b74 on sttk:use_mocha_and_expect into ** on gulpjs:master**. |
|
Sorry. I forgot to modify |
phated
left a comment
There was a problem hiding this comment.
Some open questions and some tweaks
| "prepublish": "marked-man --name gulp docs/CLI.md > gulp.1", | ||
| "pretest": "npm run lint", | ||
| "test": "lab test/*.js -cv -I Reflect", | ||
| "test": "mocha --reporter spec", |
There was a problem hiding this comment.
I thought spec was the default reporter. You can use the same set of scripts as https://github.com/gulpjs/vinyl/blob/master/package.json#L22-L26
|
|
||
| function cb(err, stdout) { | ||
| expect(stdout).to.contain('gulp --completion=' + type); | ||
| expect(stdout).toMatch('gulp --completion=' + type); |
|
|
||
| function cb(err, stdout) { | ||
| expect(stdout).to.contain('rules for \'unknown\' not found'); | ||
| expect(stdout).toMatch('rules for \'unknown\' not found'); |
|
|
||
| function cb(err, stdout, stderr) { | ||
| expect(err).to.be.not.null(); | ||
| expect(err).toNotBe(null); |
There was a problem hiding this comment.
why toNotBe instead of toNotEqual?
|
|
||
| function cb(err, stdout, stderr) { | ||
| expect(err).to.be.not.null(); | ||
| expect(err).toNotBe(null); |
There was a problem hiding this comment.
why toNotBe instead of toNotEqual?
|
|
||
| function cb(err, stdout) { | ||
| expect(err).to.be.not.null(); | ||
| expect(err).toNotBe(null); |
There was a problem hiding this comment.
why toNotBe instead of toNotEqual?
|
|
||
| function cb(err, stdout) { | ||
| expect(err).to.be.not.null(); | ||
| expect(err).toNotBe(null); |
There was a problem hiding this comment.
why toNotBe instead of toNotEqual?
| // jscs:enable | ||
|
|
||
| var cmd; | ||
| if (isIstanbul) { |
There was a problem hiding this comment.
I wrote the code referencing this part of istanbul's document. But the code became unnecessary by nyc.
|
@sttk an aside: do you think we should be using https://www.npmjs.com/package/nyc for istanbul coverage because we spawn child processes? |
|
I modified what you pointed out, and made use of nyc for coverage. |
|
@sttk great work once again! Thank you so much!!! |
|
@phated Thank you for reviewing and merging this PR. |
I modified test codes for mocha + expect.
And I made enable to measure their coverage with istanbul.