aboutsummaryrefslogtreecommitdiffstats
path: root/packages/math/vector.test.ts
blob: 145c909535a7679ce2de56ed265fc7d4bea9542a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import { isVector } from ".";

describe("Vector", () => {
  test("isVector", () => {
    expect(isVector([5, 5])).toBe(true);
    expect(isVector([-5, -5])).toBe(true);
    expect(isVector([5, 0.5])).toBe(true);
    expect(isVector(null)).toBe(false);
    expect(isVector(undefined)).toBe(false);
    expect(isVector([5, NaN])).toBe(false);
  });
});