Add hooks to tests.

This commit is contained in:
Bauke 2022-12-25 22:33:49 +01:00
parent ec714638a4
commit cfd05d028e
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 8 additions and 0 deletions

View File

@ -35,6 +35,14 @@ void setup("add", async (group) => {
});
void setup("subtract", async (group) => {
group.beforeAll(async () => {
console.log("subtract beforeAll hook");
});
group.afterAll(async () => {
console.log("subtract afterAll hook");
});
group.test("subtract(1, 1) = 0", async (test) => {
test.equals(await subtract(1, 1), 0);
});