aboutsummaryrefslogtreecommitdiffstats
path: root/packages/math/vector.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/math/vector.test.ts')
-rw-r--r--packages/math/vector.test.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/math/vector.test.ts b/packages/math/vector.test.ts
new file mode 100644
index 0000000..145c909
--- /dev/null
+++ b/packages/math/vector.test.ts
@@ -0,0 +1,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);
+ });
+});