在节点单元中测试流,报告未完成的测试

时间:2014-12-27 02:41:19

标签: node.js nodeunit

我正在测试使用node-unit编码的流。第一次测试有效,但第二次测试失败:

FAILURES: Undone tests (or their setups/teardowns): 
- testVideo

我认为这是因为异步正在发生......不确定。这就是我正在做的事情:

 rs
   .pipe(theStreamBeingTested)
   .pipe(through(captureActualResult, assertCorrectnessOfResult(test, expected)));
在assertCorrectnessOfResult中的

我做断言然后调用:test.done

但是,当我导出多个测试时,这似乎不起作用......

0 个答案:

没有答案