mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Use vitest by default
This commit is contained in:
parent
c87d40ce2d
commit
9ef5a235d2
5 changed files with 560 additions and 8 deletions
11
test/myFunction.test.ts
Normal file
11
test/myFunction.test.ts
Normal 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
8
test/myObject.test.ts
Normal 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"]);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue