-
Notifications
You must be signed in to change notification settings - Fork 83
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
test: add jest
example/test
#224
Conversation
You may need to build first with |
Opened: #225 There's syntax styling changes also in the example tests, do we want to add a eslint config in the same PR? |
I think there's already an eslint config 🤔 |
top level, yes. It's not inheriting it all the way in, ends up using my defaults |
Ah, I think that's okay. We want the examples to be separately cloneable, and we run the autofix from the top. |
Oh okay 👌 |
Yeah, I ended up adding an import for it manually. jest and its sandbox doesn't like a lot of things |
|
That's from my commits? I didn't test on windows but let me know if you have a hard time |
No, just testing on my local, but both seem almost identical, I'll check with your changes. |
can you test in your local adding EDIT: We should also change test utils deps in tests to use The error on my local Windows laptop: test/server.e2e.spec.ts
● setup
TypeError: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received 'file:\\\D:\work\issues-repos\test-utils-pr-
224\node_modules\.pnpm\nuxt@3.8.1_@types+node@20.8.10_eslint@8.53.0_rollup@3.29.4_typescript@5.2.2_vite@4.5.0\node_modules\nuxt\dist'
91 | });
92 | }
> 93 | ctx.nuxt = await kit.loadNuxt({
| ^
94 | cwd: ctx.options.rootDir,
95 | dev: ctx.options.dev,
96 | overrides: ctx.options.nuxtConfig,
at Function.createRequire (../../node_modules/.pnpm/jest-runtime@29.7.0/node_modules/jest-runtime/build/index.js:1618:23)
at module.exports (../../node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/dist/jiti.js:1:639)
at createJITI (../../node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/dist/jiti.js:1:250383)
at Object.<anonymous>.module.exports (../../node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js:14:10)
at setup (../../node_modules/.pnpm/nuxt@3.8.1_@types+node@20.8.10_eslint@8.53.0_rollup@3.29.4_typescript@5.2.2_vite@4.5.0/node_modules/nuxt/dist/index.mjs:3052:28)
at normalizedModule (../../node_modules/.pnpm/@nuxt+kit@3.8.1_rollup@3.29.4/node_modules/@nuxt/kit/dist/index.mjs:2141:37)
at installModule (../../node_modules/.pnpm/@nuxt+kit@3.8.1_rollup@3.29.4/node_modules/@nuxt/kit/dist/index.mjs:2439:95)
at initNuxt (../../node_modules/.pnpm/nuxt@3.8.1_@types+node@20.8.10_eslint@8.53.0_rollup@3.29.4_typescript@5.2.2_vite@4.5.0/node_modules/nuxt/dist/index.mjs:3696:7)
at loadNuxt (../../node_modules/.pnpm/nuxt@3.8.1_@types+node@20.8.10_eslint@8.53.0_rollup@3.29.4_typescript@5.2.2_vite@4.5.0/node_modules/nuxt/dist/index.mjs:3783:5)
at Module.loadNuxt (../../node_modules/.pnpm/@nuxt+kit@3.8.1_rollup@3.29.4/node_modules/@nuxt/kit/dist/index.mjs:2584:19)
at loadFixture (../../dist/index.mjs:93:14)
at Object.setup2 (../../dist/index.mjs:154:7) |
same error with latest changes here reverting |
resolves #347