0

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

Dorjon
  • 1
  • 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 Answers1

-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