Pulling in jest as a dependency for the frontent, example test included
This commit is contained in:
parent
15a83882ef
commit
54cca2b151
6 changed files with 3087 additions and 59 deletions
12
frontend/src/Components/__tests__/CountButton.test.ts
Normal file
12
frontend/src/Components/__tests__/CountButton.test.ts
Normal 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);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue