mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-10 02:49:57 +02:00
refactor: separate elements logic into a standalone package (#9285)
This commit is contained in:
12
packages/math/tests/vector.test.ts
Normal file
12
packages/math/tests/vector.test.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { isVector } from "../src/vector";
|
||||
|
||||
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);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user