microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
65.65k stars 3.57k forks source link

[Bug]: Tests don't show up in VSCode with latest example with node v20 #32385

Closed skamansam closed 2 weeks ago

skamansam commented 2 weeks ago

Version

1.46.1

Steps to reproduce

To Reproduce:

  1. run the above npm command: npm init playwright@latest new-project a. make sure to use typescript, not javascript
  2. open vscode in that directory
  3. install the playwright extension for VSCode
  4. Open the test panel

Expected behavior

The tests in tests/example.ts should show up in the panel.

Actual behavior

The panel says "No tests have been found in this workspace yet"

Additional context

No response

Environment

System:
    OS: Linux 6.10 Fedora Linux 40 (Workstation Edition)
    CPU: (16) x64 AMD Ryzen 9 6900HX with Radeon Graphics
    Memory: 21.32 GB / 30.60 GB
    Container: Yes
  Binaries:
    Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.15.1/bin/npm
    pnpm: 9.5.0 - ~/.nvm/versions/node/v20.15.1/bin/pnpm
  Languages:
    Bash: 5.2.26 - /usr/bin/bash
  npmPackages:
    @playwright/test: ^1.46.1 => 1.46.1
skamansam commented 2 weeks ago

This was due to an error in the playwright config file that was not being reported anywhere in vscode.