preactjs / playwright-ct Goto Github PK
View Code? Open in Web Editor NEWPreact adapter for Playwright Component testing
License: MIT License
Preact adapter for Playwright Component testing
License: MIT License
I have a project with preact and I installed the package preact/playwright-ct
, however, Im seeing this error when importing config on my config.ts
file :
"resource": "/playwright-ct.config.ts",
"owner": "typescript",
"code": "2307",
"message": "Cannot find module '@preact/playwright-ct' or its corresponding type declarations."
Does anyone know how to fix it? is there a missing dependency , maybe?
@developit
Hey, came across your library and was wondering if you guys can use some extra hands? I've been working on Playwright's component testing feature for the other frameworks and i can make sure everything is consistent? Perhaps we could advocate moving the adapter to Playwright's repository to combine efforts?
I have been trying to get V0.1.1 to run with no luck, and I am receiving the following error:
TypeError: (0 , _test._addRunnerPlugin) is not a function
at Object.<anonymous> (/Users/jacksonernst/playwright-ct/src/index.ts:27:17)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Module.f._compile (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/utilsBundleImpl.js:16:994)
at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Object.i.<computed>.ot._extensions.<computed> (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/utilsBundleImpl.js:16:1010)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/jacksonernst/playwright-ct/playwright-ct.config.ts:1:1)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Module.f._compile (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/utilsBundleImpl.js:16:994)
at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Object.i.<computed>.ot._extensions.<computed> (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/utilsBundleImpl.js:16:1010)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at requireOrImport (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/common/transform.js:163:20)
at requireOrImportDefaultObject (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/common/configLoader.js:225:53)
at ConfigLoader.loadConfigFile (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/common/configLoader.js:57:26)
at runTests (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/cli.js:127:46)
at ji.<anonymous> (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/cli.js:45:7)
I've been encountering this error when running my own tests in my project's repo, but the error above was from the tests in this repo. To produce this, I cloned this repo and tried an install with Yarn 1.22.15 (at the V0.1.1 tag). After running the build command, running the test command produced the above error.
Interestingly, installing with pnpm does not result the following error, but I am unable to use pnpm in the project I am working on. Any help would be greatly appreciated!
Edit: Just tried to run the tests in this repo at V0.1.1 after installing with Yarn 3.x and npm, both resulted in the above error. The tests only seem to work when install with pnpm
In order to update Playwright to the latest version, the following things must be resolved:
"@playwright/test": "1.34.0"
@playwright/experimental-ct-core
and use JsonObject
mount
and update
see example: https://github.com/microsoft/playwright/blob/main/packages/playwright-ct-react/registerSource.mjs#L54A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.