Skip to content

Commit

Permalink
test: add utils test
Browse files Browse the repository at this point in the history
  • Loading branch information
wzc520pyfm committed Apr 3, 2024
1 parent cd08c33 commit 4928aca
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/utils.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { expect, it, describe } from "vitest";
import U from "../src/utils";

describe("utils test", () => {
it("types", () => {
expect(U.u(undefined)).toBeTruthy();
expect(U.u(123)).toBeFalsy();

expect(U.n(456)).toBeTruthy();
expect(U.n("456")).toBeFalsy();

expect(U.o({ a: 666 })).toBeTruthy();
expect(U.o(789)).toBeFalsy();

expect(U.s('hello')).toBeTruthy();
expect(U.s(111)).toBeFalsy();
});
});

0 comments on commit 4928aca

Please sign in to comment.