mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-08-06 05:46:26 +00:00
Some checks failed
Auto release excalidraw next / Auto-release-excalidraw-next (push) Has been cancelled
Build Docker image / build-docker (push) Has been cancelled
Cancel previous runs / cancel (push) Has been cancelled
Publish Docker / publish-docker (push) Has been cancelled
New Sentry production release / sentry (push) Has been cancelled
13 lines
363 B
TypeScript
13 lines
363 B
TypeScript
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);
|
|
});
|
|
});
|