Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The web-test-runner plugins don't seem to be applying #2958

Unanswered
gmzacharydovel asked this question in Q&A
Discussion options

Hello, I'm using the web test runner plugins, but they don't seem to change anything. Manually making a plugin seems to do something. Is there something I'm missing?

zacharydovel:~/.../eumeria-online-ordering-platform/frontend/testing2$ ../../node_modules/.bin/web-test-runner
.files/frontend/src/utils/form.test.js:
 🚧 Browser logs:
 SyntaxError: The requested module '/__wds-outside-root__/2/node_modules/.deno/react@19.1.0/node_modules/react/index.js' does not provide an export named 'useRef'
 ❌ Could not import your test module. Check the browser logs or open the browser in debug mode for more information.
.files/frontend/src/utils/start-application.test.js:
 🚧 Browser logs:
 SyntaxError: The requested module '/__wds-outside-root__/2/node_modules/.deno/cookie@1.0.2/node_modules/cookie/dist/index.js' does not provide an export named 'parse'
 ❌ Could not import your test module. Check the browser logs or open the browser in debug mode for more information.
Chrome: |██████████████████████████████| 5/5 test files | 11 passed, 0 failed
Error while running tests.
import { esbuildPlugin } from "@web/dev-server-esbuild";
import rollupCommonjs from "@rollup/plugin-commonjs";
import rollupReplace from "@rollup/plugin-replace";
import { fromRollup } from "@web/dev-server-rollup";
//import { playwrightLauncher } from "@web/test-runner-playwright";
// import { importMapsPlugin } from "@web/dev-server-import-maps";
const commonjs = fromRollup(rollupCommonjs);
const replace = fromRollup(rollupReplace);
const out = {
 // //...jasmineTestRunnerConfig(),
 // //testFramework: {
 // // config: {
 // // defaultTimeoutInterval: 5000,
 // // },
 // //},
 nodeResolve: true,
 rootDir: ".",
 files: [
 ".files/frontend/src/**/*.test.js",
 //".files/frontend/src/utils/create-weak-cache.test.js"
 ],
 plugins: [
 commonjs({}),
 esbuildPlugin({
 tsx: true,
 ts: true,
 jsxFactory: "React.createElement",
 jsxFragment: "Fragment",
 }),
 replace({
 preventAssignment: true,
 "include": [
 "react",
 "react-dom/client",
 "react-dom",
 "node_modules/react-dom/client.js",
 ],
 "process.env.NODE_ENV": '"development"',
 "process": '{ env: { NODE_ENV: "development" } }',
 }),
 ],
 // // browsers: [playwrightLauncher({ product: "chromium" })],
};
export default out;
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /