Use vitest by default

This commit is contained in:
garronej 2023-05-21 13:57:34 +02:00
parent c87d40ce2d
commit 9ef5a235d2
5 changed files with 560 additions and 8 deletions

11
test/myFunction.test.ts Normal file
View file

@ -0,0 +1,11 @@
import { describe, it, expect } from "vitest";
import { myFunction } from "../src/myFunction";
describe("Test myFunction", () => {
it("Should return the correct value", async () => {
expect(myFunction()).toStrictEqual(["a", "b", "c"]);
});
it("should return the correct number of element", async () => {
expect(myFunction().length).toBe(3);
});
});

8
test/myObject.test.ts Normal file
View file

@ -0,0 +1,8 @@
import { describe, it, expect } from "vitest";
import { myObject } from "../src/myObject";
describe("Test myObject", () => {
it("Should have the correct keys", async () => {
expect(Object.keys(myObject)).toStrictEqual(["p"]);
});
});