| }); | }); | ||||
| it("4Khz for approx. 1 second", function(){ | it("4Khz for approx. 1 second", function(){ | ||||
| let dt = speedTest(4000); | |||||
| expect(count).to.be.lt(4004); | |||||
| let ts = 4000; | |||||
| let d = ts * 0.01; | |||||
| let dt = speedTest(ts); | |||||
| expect(count).to.be.gt(ts - d); | |||||
| expect(count).to.be.lt(ts + d); | |||||
| expect(dt).to.be.lt(1000); | expect(dt).to.be.lt(1000); | ||||
| }); | }); | ||||
| it("4Mhz for approx. 1 second", function(){ | it("4Mhz for approx. 1 second", function(){ | ||||
| let dt = speedTest(4000000); | |||||
| expect(count).to.be.lt(4000004); | |||||
| let ts = 4000000; | |||||
| let d = ts * 0.01; | |||||
| let dt = speedTest(ts); | |||||
| expect(count).to.be.gt(ts - d); | |||||
| expect(count).to.be.lt(ts + d); | |||||
| expect(dt).to.be.lt(1000); | expect(dt).to.be.lt(1000); | ||||
| }); | }); | ||||
| }); | }); |