You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extra: I can run npx playwright test in the directory just fine only the Playwright test throws this error Code Snippet
Running 0 tests using 0 workers
Error: tests\example.spec.ts:5:16: Playwright Test did not expect test() to be called here.
Most common reasons include:
You are calling test() in a configuration file.
You are calling test() 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 ..\node_modules@playwright\test\lib\util.js:216
214 |
215 | function errorWithLocation(location, message) {
216 | return new Error(${formatLocation(location)}: ${message});
| ^
217 | }
218 |
219 | function expectTypes(receiver, types, matcherName) {
at errorWithLocation (C:\work\playwright\node_modules\@playwright\test\lib\util.js:216:10)
at TestTypeImpl._ensureCurrentSuite (C:\work\playwright\node_modules\@playwright\test\lib\testType.js:80:41)
at TestTypeImpl._createTest (C:\work\playwright\node_modules\@playwright\test\lib\testType.js:89:24)
at C:\work\playwright\node_modules\@playwright\test\lib\transform.js:267:12
at Object.<anonymous> (C:\work\playwright\tests\example.spec.ts:5:16)
=================
no tests found.
1 error was not a part of any test, see above for details
Test run finished at 9/25/2022, 3:42:12 PM <
Describe the bug
I just installed a fresh Node.js and a Fresh VS Code to test out playwright as a test framework. I installed the Microsoft Playwright extension in VS Code and created a project with test: Install Playwright. when i executed the "npx playwright test" in the directory it worked, but when I tried to use the test explorer it throws this error. I'm not sure what it wants to find in at Object. (C:\work\playwright\tests\example.spec.ts:5:16) since that's an empty line:
I changed nothing in the entire directory it doesn't work simply when installed. Also the green triangles that indicates the test can be executed are also missing.
The text was updated successfully, but these errors were encountered:
I am in a similar boat. Whenever I try to run the example test, it says:
Running 0 tests using 0 workers
no tests found.
My current tests still work, but any NEW tests after updating to v1.26.0 are not being found. I have downgraded to v1.25.0 on all aspects of Playwright the new tests are still not found. I even went as far as uninstalling Playwright and reinstalling. Something fundamentally changed with Playwright it seems with v1.26.0.
Context:
Code Snippet
Running 0 tests using 0 workers
Error: tests\example.spec.ts:5:16: Playwright Test did not expect test() to be called here.
Most common reasons include:
You are calling test() in a configuration file.
You are calling test() 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 ..\node_modules@playwright\test\lib\util.js:216
214 |
215 | function errorWithLocation(location, message) {
=================
no tests found.
1 error was not a part of any test, see above for details
Describe the bug
I just installed a fresh Node.js and a Fresh VS Code to test out playwright as a test framework. I installed the Microsoft Playwright extension in VS Code and created a project with test: Install Playwright. when i executed the "npx playwright test" in the directory it worked, but when I tried to use the test explorer it throws this error. I'm not sure what it wants to find in at Object. (C:\work\playwright\tests\example.spec.ts:5:16) since that's an empty line:
I changed nothing in the entire directory it doesn't work simply when installed. Also the green triangles that indicates the test can be executed are also missing.
The text was updated successfully, but these errors were encountered: