Pulling in jest as a dependency for the frontent, example test included

This commit is contained in:
Imbus 2024-03-02 03:47:53 +01:00
parent 15a83882ef
commit 54cca2b151
6 changed files with 3087 additions and 59 deletions

View file

@ -0,0 +1,12 @@
import { describe, expect, test } from "@jest/globals";
function sum(a: number, b: number): number {
return a + b;
}
// This is obviously not testing the proper component
describe("sum module", () => {
test("adds 1 + 2 to equal 3", () => {
expect(sum(1, 1)).toBe(2);
});
});