@nuxt/test-utils-nightly 3.20.2-20251117-210444-eba19d1 → 3.20.2-20251204-114711-db7a66f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.mjs +10 -3
- package/package.json +1 -1
package/dist/module.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { walk } from 'estree-walker';
|
|
|
10
10
|
import MagicString from 'magic-string';
|
|
11
11
|
import { createUnplugin } from 'unplugin';
|
|
12
12
|
import { readFileSync } from 'node:fs';
|
|
13
|
-
import { extname, join, dirname } from 'pathe';
|
|
13
|
+
import { extname, join, dirname, relative } from 'pathe';
|
|
14
14
|
import 'node:process';
|
|
15
15
|
import 'vite';
|
|
16
16
|
import 'c12';
|
|
@@ -339,8 +339,15 @@ const module$1 = defineNuxtModule({
|
|
|
339
339
|
nuxt.options.vite.define ||= {};
|
|
340
340
|
nuxt.options.vite.define["import.meta.vitest"] = "undefined";
|
|
341
341
|
}
|
|
342
|
-
nuxt.hook("prepare:types", (
|
|
343
|
-
references.push({ types: "vitest/import-meta" });
|
|
342
|
+
nuxt.hook("prepare:types", (ctx2) => {
|
|
343
|
+
ctx2.references.push({ types: "vitest/import-meta" });
|
|
344
|
+
if (ctx2.nodeTsConfig) {
|
|
345
|
+
ctx2.nodeTsConfig.include ||= [];
|
|
346
|
+
ctx2.nodeTsConfig.include.push(relative(nuxt.options.buildDir, join(nuxt.options.rootDir, "vitest.config.*")));
|
|
347
|
+
if (nuxt.options.workspaceDir !== nuxt.options.rootDir) {
|
|
348
|
+
ctx2.nodeTsConfig.include.push(relative(nuxt.options.buildDir, join(nuxt.options.workspaceDir, "vitest.config.*")));
|
|
349
|
+
}
|
|
350
|
+
}
|
|
344
351
|
});
|
|
345
352
|
if (!nuxt.options.dev) return;
|
|
346
353
|
if (process.env.TEST || process.env.VITE_TEST) return;
|