@nuxt/test-utils 3.9.0-alpha.3 → 3.9.0

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 CHANGED
@@ -330,7 +330,7 @@ const vitePluginBlocklist = ["vite-plugin-vue-inspector", "vite-plugin-vue-inspe
330
330
  const module = defineNuxtModule({
331
331
  meta: {
332
332
  name: "@nuxt/test-utils",
333
- configKey: "vitest"
333
+ configKey: "testUtils"
334
334
  },
335
335
  defaults: {
336
336
  startOnBoot: false,
@@ -19,7 +19,7 @@ type OptionalFunction<T> = T | (() => Awaitable<T>);
19
19
  * test: "test-field"
20
20
  * })
21
21
  * ```
22
- * @see https://github.com/danielroe/nuxt-vitest#registerendpoint
22
+ * @see https://nuxt.com/docs/getting-started/testing#registerendpoint
23
23
  */
24
24
  declare function registerEndpoint(url: string, options: EventHandler | {
25
25
  handler: EventHandler;
@@ -39,7 +39,7 @@ declare function registerEndpoint(url: string, options: EventHandler | {
39
39
  * }
40
40
  * })
41
41
  * ```
42
- * @see https://github.com/danielroe/nuxt-vitest#mocknuxtimport
42
+ * @see https://nuxt.com/docs/getting-started/testing#mocknuxtimport
43
43
  */
44
44
  declare function mockNuxtImport<T = any>(_name: string, _factory: () => T | Promise<T>): void;
45
45
  /**
@@ -72,7 +72,7 @@ declare function mockNuxtImport<T = any>(_name: string, _factory: () => T | Prom
72
72
  * // or you can use SFC for redirecting to a mock component
73
73
  * mockComponent('MyComponent', () => import('./MockComponent.vue'))
74
74
  * ```
75
- * @see https://github.com/danielroe/nuxt-vitest#mockcomponent
75
+ * @see https://nuxt.com/docs/getting-started/testing#mockcomponent
76
76
  */
77
77
  declare function mockComponent<Props, RawBindings = object>(path: string, setup: OptionalFunction<(props: Readonly<Props>, ctx: SetupContext) => RawBindings | RenderFunction>): void;
78
78
  declare function mockComponent<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string>(path: string, options: OptionalFunction<ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II>>): void;
@@ -19,7 +19,7 @@ type OptionalFunction<T> = T | (() => Awaitable<T>);
19
19
  * test: "test-field"
20
20
  * })
21
21
  * ```
22
- * @see https://github.com/danielroe/nuxt-vitest#registerendpoint
22
+ * @see https://nuxt.com/docs/getting-started/testing#registerendpoint
23
23
  */
24
24
  declare function registerEndpoint(url: string, options: EventHandler | {
25
25
  handler: EventHandler;
@@ -39,7 +39,7 @@ declare function registerEndpoint(url: string, options: EventHandler | {
39
39
  * }
40
40
  * })
41
41
  * ```
42
- * @see https://github.com/danielroe/nuxt-vitest#mocknuxtimport
42
+ * @see https://nuxt.com/docs/getting-started/testing#mocknuxtimport
43
43
  */
44
44
  declare function mockNuxtImport<T = any>(_name: string, _factory: () => T | Promise<T>): void;
45
45
  /**
@@ -72,7 +72,7 @@ declare function mockNuxtImport<T = any>(_name: string, _factory: () => T | Prom
72
72
  * // or you can use SFC for redirecting to a mock component
73
73
  * mockComponent('MyComponent', () => import('./MockComponent.vue'))
74
74
  * ```
75
- * @see https://github.com/danielroe/nuxt-vitest#mockcomponent
75
+ * @see https://nuxt.com/docs/getting-started/testing#mockcomponent
76
76
  */
77
77
  declare function mockComponent<Props, RawBindings = object>(path: string, setup: OptionalFunction<(props: Readonly<Props>, ctx: SetupContext) => RawBindings | RenderFunction>): void;
78
78
  declare function mockComponent<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string>(path: string, options: OptionalFunction<ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II>>): void;
@@ -22,12 +22,12 @@ function registerEndpoint(url, options) {
22
22
  }
23
23
  function mockNuxtImport(_name, _factory) {
24
24
  throw new Error(
25
- "mockNuxtImport() is a macro and it did not get transpiled, this may be an internal bug of nuxt-vitest."
25
+ "mockNuxtImport() is a macro and it did not get transpiled. This may be an internal bug of @nuxt/test-utils."
26
26
  );
27
27
  }
28
28
  function mockComponent(_path, _component) {
29
29
  throw new Error(
30
- "mockComponent() is a macro and it did not get transpiled, this may be an internal bug of nuxt-vitest."
30
+ "mockComponent() is a macro and it did not get transpiled. This may be an internal bug of @nuxt/test-utils."
31
31
  );
32
32
  }
33
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/test-utils",
3
- "version": "3.9.0-alpha.3",
3
+ "version": "3.9.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/test-utils.git"
@@ -50,7 +50,7 @@
50
50
  "ufo": "^1.3.2",
51
51
  "unenv": "^1.8.0",
52
52
  "unplugin": "^1.5.1",
53
- "vitest-environment-nuxt": "1.0.0-alpha.1"
53
+ "vitest-environment-nuxt": "^1.0.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@jest/globals": "29.7.0",