2016-06-24 36 views

回答

0

测试语法在比较简单的mocha

实际使用gulp-mocha时保持不变gulp-mocha是只是一个包装,以帮助您通过gulp

+0

我收到一个错误,说当按照它在网站上描述的方式尝试它时,函数'run'没有被定义。 – DevNebulae

+0

你能否用你的'gulpfile'代码和测试文件的代码更新你的文章,哪里出错? – Stanislav

+0

这不是代码破坏,它只是一个关于如何实现它的普遍问题。 – DevNebulae

0

运行测试套件来解决这个问题的理想方法是做一个异步测试。

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 
    }); 
});