Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: vitest tries to run Playwright tests #5927

Closed
6 tasks done
hamirmahal opened this issue Jun 19, 2024 · 7 comments
Closed
6 tasks done

[Bug]: vitest tries to run Playwright tests #5927

hamirmahal opened this issue Jun 19, 2024 · 7 comments

Comments

@hamirmahal
Copy link
Contributor

Describe the bug

vitest tries to run Playwright tests.

Reproduction

https://github.com/hamirmahal/vitest-playwright

System Info

System:
    OS: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
    Memory: 22.11 GB / 31.03 GB
    Container: Yes
    Shell: 5.1.16 - /usr/bin/bash
  Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.9.0/bin/yarn
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
    pnpm: 9.4.0 - ~/.local/bin/pnpm
  Browsers:
    Brave Browser: 124.1.65.133
  npmPackages:
    vitest: ^1.6.0 => 1.6.0

Used Package Manager

npm

Validations

@hamirmahal
Copy link
Contributor Author

microsoft/playwright#31348 is related.

@hamirmahal
Copy link
Contributor Author

@hamirmahal
Copy link
Contributor Author

@sheremet-va
Copy link
Member

sheremet-va commented Jun 19, 2024

test/responsiveness.spec.ts matches the default include: '**/*.{test,spec}.?(c|m)[jt]s?(x)'

Change your include pattern to not include your playwright tests.

@sheremet-va sheremet-va closed this as not planned Won't fix, can't repro, duplicate, stale Jun 19, 2024
@hamirmahal
Copy link
Contributor Author

Is it worth opening a feature request for vitest to automatically skip Playwright tests?

@hamirmahal
Copy link
Contributor Author

It'd be nice if vitest could automatically skip a file if it sees

import ... from "@playwright/test";

at the top or something.

@sheremet-va
Copy link
Member

No, it is the developer's responsibility to organize their tests, we cannot assume how other tools work.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants