Skip to content

Commit 17cd71d

Browse files
committed
Restore compatibility with @std/testing/bdd
1 parent 6dd85ee commit 17cd71d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

bdd/mod.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@ import {
99
let current: TestAdapter | undefined;
1010

1111
export function describe(name: string, body: () => void) {
12-
const isTop = !current;
1312
const original = current;
1413
try {
1514
const child = current = createTestAdapter({ name, parent: original });
16-
if (isTop) {
17-
//
18-
}
1915

2016
$describe(name, () => {
2117
$afterAll(() => child.destroy());
@@ -33,12 +29,13 @@ export function beforeEach(body: () => Operation<void>) {
3329
current?.addSetup(body);
3430
}
3531

36-
export function it(desc: string, body?: () => Operation<void>): Promise<void> {
32+
export function it(desc: string, body?: () => Operation<void>): void {
3733
const adapter = current!;
3834
if (!body) {
39-
return $it.skip(desc, () => {});
35+
$it.skip(desc, () => {});
36+
return;
4037
}
41-
return $it(desc, async () => {
38+
$it(desc, async () => {
4239
const result = await adapter.runTest(body);
4340
if (!result.ok) {
4441
throw result.error;

0 commit comments

Comments
 (0)