From 2b8ea73048f2368998555141b7493b28d4dbd3c8 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 11 Jun 2021 16:20:13 -0700 Subject: [PATCH] docs(test-runner): fixed wrong function calls (#7080) --- docs/src/test-fixtures.md | 8 ++++---- types/test.d.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/src/test-fixtures.md b/docs/src/test-fixtures.md index 1de591e818..62c5330000 100644 --- a/docs/src/test-fixtures.md +++ b/docs/src/test-fixtures.md @@ -21,17 +21,17 @@ Here is how typical test environment setup differs between traditional test styl const { test } = require('@playwright/test'); const { TodoPage } = require('./todo-page'); -describe('todo tests', () => { +test.describe('todo tests', () => { let todoPage; - beforeEach(async ({ page }) => { + test.beforeEach(async ({ page }) => { todoPage = new TodoPage(page); await todoPage.goto(); await todoPage.addToDo('item1'); await todoPage.addToDo('item2'); }); - afterEach(async () => { + test.afterEach(async () => { await todoPage.removeAll(); }); @@ -168,7 +168,7 @@ module.exports = base.test.extend({ ```js js-flavor=ts // hello.ts -import base from '@playwright/test'; +import { test as base } from '@playwright/test'; // Define test fixtures "hello" and "helloWorld". type TestFixtures = { diff --git a/types/test.d.ts b/types/test.d.ts index 47b1276942..cbfdd2a7ac 100644 --- a/types/test.d.ts +++ b/types/test.d.ts @@ -806,7 +806,7 @@ export interface TestType({