Use top-level await everywhere.
This commit is contained in:
parent
50d5b71d03
commit
967c709b85
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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 () => {
|
||||
|
|
Loading…
Reference in New Issue