The normal version of Mocha supports delays before executings tests (link: https://mochajs.org/#hooks).
Is there a way to do this in gulp-mocha?
The normal version of Mocha supports delays before executings tests (link: https://mochajs.org/#hooks).
Is there a way to do this in gulp-mocha?
The tests syntax remains the same when using gulp-mocha
in compare to simple mocha
Actually, gulp-mocha
is just a wrapper to help you run test suites via gulp
The ideal way to fix this issue is to make an asynchronous test.
describe('StackOverflowExample', function() {
it('Demonstrates how to create a test with delay', async function(done) {
setTimeout(() => {
//Your code here
done();
}, 250); //Set the delay to your liking
});
});