(frameRate)
| 15 | const $target = getTarget(), |
| 16 | frameRates = [5, 15, 30, 60], |
| 17 | testFrame = (frameRate) => { |
| 18 | let counter = 0; |
| 19 | |
| 20 | Velocity.defaults.fpsLimit = frameRate; |
| 21 | // Test if the frame rate is assigned succesfully. |
| 22 | assert.equal(frameRate, Velocity.defaults.fpsLimit, "Setting global fps limit to " + frameRate); |
| 23 | |
| 24 | return Velocity($target, defaultProperties, |
| 25 | { |
| 26 | duration: 1000, |
| 27 | progress() { |
| 28 | counter++; |
| 29 | }, |
| 30 | }) |
| 31 | .then(() => counter); |
| 32 | }; |
| 33 | |
| 34 | assert.expect(frameRates.length * 2); |
| 35 | // Test if the limit is working for 60, 30, 15 and 5 fps. |
no test coverage detected
searching dependent graphs…