diff --git a/examples/cucumber-style/features/steps/fixtures.ts b/examples/cucumber-style/features/steps/fixtures.ts index 31c223cb..07110cfa 100644 --- a/examples/cucumber-style/features/steps/fixtures.ts +++ b/examples/cucumber-style/features/steps/fixtures.ts @@ -2,7 +2,10 @@ import { test as base, createBdd } from 'playwright-bdd'; import { World } from './world'; export const test = base.extend<{ world: World }>({ - world: ({ page }, use, testInfo) => use(new World(page, testInfo)), + world: async ({ page }, use, testInfo) => { + const world = new World(page, testInfo); + await use(world); + }, }); export const { Given, When, Then } = createBdd(test, { worldFixture: 'world' });