question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] How can I run Playwright’s test inside a preact project?

See original GitHub issue

I found this plugin https://www.npmjs.com/package/@preact/playwright-ct?activeTab=readme, but there is not enough documentation to test it, and when I try to run yarn run test-ct, the below error shows up.

any help is appreciated.

[vite]: Rollup failed to resolve import "react" from "playwright/index.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
Error: [vite]: Rollup failed to resolve import "react" from "playwright/index.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`

is there any other framework I could use on preact for e2e, test automation, etc, testing?

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JoviDeCroockcommented, Dec 28, 2022

@chrisha22 thanks for checking, made a PR to update our readme and will try to publish that so the instructions are on npm

1reaction
chrisha22commented, Dec 28, 2022

Hey, It worked!, thanks guys, I appreciate your help!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Question] How can I run Playwright's test inside a preact ...
I found this plugin https://www.npmjs.com/package/@preact/playwright-ct?activeTab=readme, but there is not enough documentation to test it, and when I try to ...
Read more >
Playwright setup on a preact proyect - reactjs - Stack Overflow
I am new playing around with Playwright and preact, and I would like to create test automation using this library, is there some ......
Read more >
Getting started with Playwright component testing
Let's explore the recently-introduced Playwright component testing feature, using it to test React, Vue, and Svelte components in an app.
Read more >
Playwright Beginner Tutorial 3 | How to run tests - YouTube
ALL FREE COURSES ▻ https://automationstepbystep.com/ ▭ ASK RAGHAV ▻ https://bit.ly/2CoJGWf QUIZ - https://forms.gle/TXRXbM8URRXppwem6▭▭ ...
Read more >
Testing with Preact Testing Library
The Preact Testing Library is a lightweight wrapper around preact/test-utils . It provides a set of query methods for accessing the rendered DOM...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found