Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
23 lines
837 B
Plaintext
23 lines
837 B
Plaintext
import { expect, test } from "vitest";
|
|
import { parsedType } from "../../../locales/en.js";
|
|
|
|
test("parsedType", () => {
|
|
expect(parsedType("string")).toBe("string");
|
|
expect(parsedType(1)).toBe("number");
|
|
expect(parsedType(true)).toBe("boolean");
|
|
expect(parsedType(null)).toBe("null");
|
|
expect(parsedType(undefined)).toBe("undefined");
|
|
expect(parsedType([])).toBe("array");
|
|
expect(parsedType({})).toBe("object");
|
|
expect(parsedType(new Date())).toBe("Date");
|
|
expect(parsedType(new Map())).toBe("Map");
|
|
expect(parsedType(new Set())).toBe("Set");
|
|
expect(parsedType(new Error())).toBe("Error");
|
|
|
|
const nullPrototype = Object.create(null);
|
|
expect(parsedType(nullPrototype)).toBe("object");
|
|
|
|
const doubleNullPrototype = Object.create(Object.create(null));
|
|
expect(parsedType(doubleNullPrototype)).toBe("object");
|
|
});
|