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

Playwright reports Error: No tests found after fresh install #9793

Closed
jakerr opened this issue Apr 28, 2023 · 1 comment · Fixed by #9795
Closed

Playwright reports Error: No tests found after fresh install #9793

jakerr opened this issue Apr 28, 2023 · 1 comment · Fixed by #9795
Labels
pkg:create-svelte ready to implement please submit PRs for these issues!

Comments

@jakerr
Copy link

jakerr commented Apr 28, 2023

Describe the bug

Running the npm create svelte@latest script and then attempting to run the playwright tests gives an error.

$ playwright test
[WebServer] 
[WebServer] 
[WebServer] 
Error: No tests found

I tried with various combinations such as the "App" template and the "Library" template, as well as Typescript v.s. Javascript.
And they all show that same error even though there appears to be a default test at:

tests/test.ts or tests/test.js

Reproduction

Run the following:

npm create svelte@latest my-app
cd my-app
npm install
npm run test

Logs

> npm create svelte@latest my-app
cd my-app
npm install
npm run test

create-svelte version 4.1.0

┌  Welcome to SvelteKit!
│
◇  Which Svelte app template?
│  SvelteKit demo app
│
◇  Add type checking with TypeScript?
│  Yes, using TypeScript syntax
│
◇  Select additional options (use arrow keys/space bar)
│  Add ESLint for code linting, Add Prettier for code formatting, Add Playwright for browser testing, Add Vitest for unit testing
│
└  Your project is ready!

✔ Typescript
  Inside Svelte components, use <script lang="ts">

✔ ESLint
  https://github.com/sveltejs/eslint-plugin-svelte

✔ Prettier
  https://prettier.io/docs/en/options.html
  https://github.com/sveltejs/prettier-plugin-svelte#options

✔ Playwright
  https://playwright.dev

✔ Vitest
  https://vitest.dev

Install community-maintained integrations:
  https://github.com/svelte-add/svelte-add

Next steps:
  1: cd my-app
  2: npm install (or pnpm install, etc)
  3: git init && git add -A && git commit -m "Initial commit" (optional)
  4: npm run dev -- --open

To close the dev server, hit Ctrl-C

Stuck? Visit us at https://svelte.dev/chat

added 231 packages, and audited 232 packages in 23s

47 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> my-app@0.0.1 test
> playwright test

[WebServer] 
[WebServer] "confetti" is imported from external module "@neoconfetti/svelte" but never used in "src/routes/sverdle/+page.svelte".
[WebServer] 
[WebServer] 
Error: No tests found

System Info

System:
    OS: macOS 13.2.1
    CPU: (8) arm64 Apple M2
    Memory: 75.13 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 19.5.0 - ~/.nodenv/versions/19.5.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.3.1 - ~/.nodenv/versions/19.5.0/bin/npm
  Browsers:
    Chrome: 112.0.5615.137
    Chrome Canary: 115.0.5737.0
    Safari: 16.3
  npmPackages:
    @sveltejs/adapter-auto: ^2.0.0 => 2.0.1
    @sveltejs/kit: ^1.5.0 => 1.15.9
    svelte: ^3.54.0 => 3.58.0
    vite: ^4.3.0 => 4.3.3

Severity

annoyance

Additional Information

No response

@gtm-nayan
Copy link
Contributor

Looks like they changed the globs in Playwright 1.33. Gah.

@dummdidumm dummdidumm added pkg:create-svelte ready to implement please submit PRs for these issues! labels Apr 28, 2023
dummdidumm pushed a commit that referenced this issue Apr 28, 2023
Playwright changed the default regex, so we pin it by adding one ourselves. fixes #9793
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:create-svelte ready to implement please submit PRs for these issues!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants