|
1 | 1 | import { linear } from "./movementtype.function";
|
2 | 2 |
|
3 | 3 | describe("MovementType", () => {
|
4 |
| - it("should return a set of linear timesteps, one millisecond per step.", () => { |
5 |
| - const expected = [1, 1, 1, 1, 1, 1]; |
| 4 | + it("should return a set of linear timesteps, 1000000 nanosecond per step.", () => { |
| 5 | + const expected = [1000000, 1000000, 1000000, 1000000, 1000000, 1000000]; |
6 | 6 | expect(linear(6, 1000)).toEqual(expected);
|
7 | 7 | });
|
8 | 8 |
|
9 |
| - it("should threshold movement speed to one pixel per millisecond in case of faster movement.", () => { |
10 |
| - const expected = [1, 1, 1, 1, 1, 1]; |
11 |
| - expect(linear(6, 2000)).toEqual(expected); |
12 |
| - }); |
13 |
| - |
14 |
| - it("should should return a set of linear timesteps, two milliseconds per step.", () => { |
15 |
| - const expected = [2, 2, 2, 2, 2, 2]; |
| 9 | + it("should should return a set of linear timesteps, 2000000 nanoseconds per step.", () => { |
| 10 | + const expected = [2000000, 2000000, 2000000, 2000000, 2000000, 2000000]; |
16 | 11 | expect(linear(6, 500)).toEqual(expected);
|
17 | 12 | });
|
18 |
| - |
19 |
| - it("should floor movement to three milliseconds per step.", () => { |
20 |
| - const expected = [3, 3, 3, 3, 3, 3]; |
21 |
| - expect(linear(6, 300)).toEqual(expected); |
22 |
| - }); |
23 | 13 | });
|
0 commit comments