浏览代码

Clock test allows slight variance for amount of real time passage.

master
Bryan Miller 6 年前
父节点
当前提交
d137381005
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. +4
    -2
      test/unit.src.common.clock.spec.js

+ 4
- 2
test/unit.src.common.clock.spec.js 查看文件

let dt = speedTest(ts); let dt = speedTest(ts);
expect(count).to.be.gt(ts - d); expect(count).to.be.gt(ts - d);
expect(count).to.be.lt(ts + d); expect(count).to.be.lt(ts + d);
expect(dt).to.be.lt(1000);
expect(dt).to.be.gt(990);
expect(dt).to.be.lt(1010);
}); });


it("4Mhz for approx. 1 second", function(){ it("4Mhz for approx. 1 second", function(){
let dt = speedTest(ts); let dt = speedTest(ts);
expect(count).to.be.gt(ts - d); expect(count).to.be.gt(ts - d);
expect(count).to.be.lt(ts + d); expect(count).to.be.lt(ts + d);
expect(dt).to.be.lt(1000);
expect(dt).to.be.gt(990);
expect(dt).to.be.lt(1010);
}); });
}); });

正在加载...
取消
保存