-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtests.js
More file actions
32 lines (29 loc) · 761 Bytes
/
Copy pathtests.js
File metadata and controls
32 lines (29 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var assert = require('assert');
var gutil = require('gulp-util');
var blanket = require('./gulp-blanket');
var fs = require('fs');
describe('gulp-blanket', function (done) {
it('should remoe the coverage file', function () {
if (fs.existsSync('coverage.html')) {
fs.unlinkSync('coverage.html');
}
assert(!fs.existsSync('coverage.html'));
});
it('generate a coverage.html file', function (done) {
var stream = blanket({
captureFile: 'coverage.html',
instrument: ['fixture-pass.js']
});
reallyDone = function () {
assert(true);
done();
};
setInterval(function() {
if (fs.existsSync('coverage.html')) {
reallyDone();
}
}, 100);
stream.write(new gutil.File({path: 'fixture-pass.js'}));
stream.end();
});
});