I am trying execute mocha test file through gulp using gulp-mocha. Such that I need variable to be passed(or pipe) to mocha test file which can be accessed in mocha test file. How can I achieve this one
Asked
Active
Viewed 56 times
0
-
Please show the code you are trying to affect in your test suite. There are quite a few ways to convey information from gulp to Mocha, and which one works best depends on the specifics of what you want to do. – Louis Apr 20 '17 at 13:17
1 Answers
-1
To use a test file,
gulp.task('taskname', function (done) {
gulp.src('test/testfile.js')
.pipe(gulpmocha(),setTimeout(function() {
done(null);
}, 5000))
});
To pass a variable, you may need to post your code and test

user2347763
- 469
- 2
- 10
-
How does one get to make these down voters leave a comment as to why the downvote? – user2347763 Oct 01 '17 at 01:08