-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Vitest was initialized with native Node instead of Vite Node #13394
Comments
Vitest was initialized with native Node instead of Vite Node
Are you sure this is a problem with Nuxt? I was running into the same problem when running Vitest on pre-compiled import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
include: ['dist/__test__/**/mapping.spec.js'],
// include: ['src/__test__/**/mapping.spec.ts'],
exclude: [],
watchIgnore: [],
},
}) Note: Running the tests on the |
Vitest v0.5.1 should fix it. |
Still doesn't seem to work with Please run:
You should see: |
I can confirm that my issue is no longer reproducible. @schickling, your issue might be a different one that simply has the same symptom - possibly worth raising at the vitest repo? |
I've just cloned that repo and i'm currently getting the |
I'm also running into this. Here's a reproduction repo. |
In my case, creating import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
environment: "jsdom",
deps: {
inline: [/@nuxt\/test-utils-edge/],
},
},
}) |
This did not work for me. It's now trying to find jest.
|
@asmerkin Would you open a new issue/discussion with a reproduction? |
@danielroe done here: #15315 |
The async import doesn't seem to respect the environment of the test runner.
Reproduction: https://github.com/danielroe/test-utils-test
cc: @antfu
The text was updated successfully, but these errors were encountered: