提交 066ad6b2 编写于 作者: J Joao Moreno

fix stopwatch event tests

上级 99615195
......@@ -333,17 +333,17 @@ suite('fromPromise', () => {
suite('stopwatch', () => {
test('should emit when done', () => {
test('should emit', () => {
const emitter = new Emitter<void>();
const event = stopwatch(emitter.event);
return new TPromise(c => {
event(duration => {
assert(duration > 5);
assert(duration > 100);
c(null);
});
setTimeout(() => emitter.fire(), 5);
setTimeout(() => emitter.fire(), 100);
});
});
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册