Skip to content

Chapter 4 - Error: Playwright Test did not expect test.beforeAll() to be called here. #36

@SadhafAhmed

Description

@SadhafAhmed

Chapter 4 - when run test to see applitool example 3 spec seems to error...

Error: Playwright Test did not expect test.beforeAll() to be called here.
Most common reasons include:

  • You are calling test.beforeAll() in a configuration file.

  • You are calling test.beforeAll() in a file that is imported by the configuration file.

  • You have two different versions of @playwright/test. This usually happens
    when one of the dependencies in your package.json depends on @playwright/test.

    at tests\example3.spec.ts:26

    24 | export const USE_ULTRAFAST_GRID: boolean = false;
    25 | export let Batch: BatchInfo;

26 | export let Config: Configuration;
| ^
27 | export let Runner: EyesRunner;
28 | let eyes: Eyes;
29 | // end of Applitools
at TestTypeImpl._currentSuite (C:\PlaywrightCourse\tau-introduction-to-playwright\node_modules@playwright\test\lib\common\testType.js:69:13)
at TestTypeImpl._hook (C:\PlaywrightCourse\tau-introduction-to-playwright\node_modules@playwright\test\lib\common\testType.js:111:24)
at Function.beforeAll (C:\PlaywrightCourse\tau-introduction-to-playwright\node_modules@playwright\test\lib\common\transform.js:221:12)
at Object. (C:\PlaywrightCourse\tau-introduction-to-playwright\tests\example3.spec.ts:26:12)

Error: No tests found.
Make sure that arguments are regular expressions matching test files.
You may need to escape symbols like "$" or "*" and quote the arguments.

To open last HTML report run:

npx playwright show-report

Chapter4Error001

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is neededpendingquestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions