Use top-level await everywhere.

This commit is contained in:
Bauke 2024-01-27 13:04:13 +01:00
parent 50d5b71d03
commit 967c709b85
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
3 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ import {setup} from "@holllo/test";
const add = (a: number, b: number): number => a + b;
void setup("add", async (group) => {
await setup("add", async (group) => {
group.test("1 + 1", async (test) => {
test.equals(add(1, 1), 2);
});

View File

@ -2,7 +2,7 @@ import {setup} from "../source/index.js";
const add = (a: number, b: number): number => a + b;
void setup("Example add", async (group) => {
await setup("Example add", async (group) => {
group.test("1 + 1", async (test) => {
test.equals(add(1, 1), 2);
});

View File

@ -23,7 +23,7 @@ async function subtract(a: number, b: number): Promise<number> {
return a - b;
}
void setup("add", async (group) => {
await setup("add", async (group) => {
group.test("add(1, 1) = 2", async (test) => {
test.equals(await add(1, 1), 2);
});
@ -37,7 +37,7 @@ void setup("add", async (group) => {
});
});
void setup(
await setup(
"subtract",
async (group) => {
group.beforeAll(async () => {