@nuxt/test-utils 3.4.3 → 3.5.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.
@@ -1,6 +1,6 @@
1
1
  import { resolve } from 'pathe';
2
2
  import { stringifyQuery } from 'ufo';
3
- import { $ as $fetch, u as useTestContext } from './shared/test-utils.1e170326.mjs';
3
+ import { $ as $fetch, u as useTestContext } from './shared/test-utils.88b1fbfd.mjs';
4
4
  import 'execa';
5
5
  import 'get-port-please';
6
6
  import 'ofetch';
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ interface TestOptions {
28
28
  launch?: LaunchOptions;
29
29
  };
30
30
  server: boolean;
31
+ port?: number;
31
32
  }
32
33
  interface TestContext {
33
34
  options: TestOptions;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { u as useTestContext, a as url, c as createTestContext, s as setTestContext, b as stopServer, d as startServer } from './shared/test-utils.1e170326.mjs';
2
- export { $ as $fetch, e as exposeContextToEnv, f as fetch, i as isDev, r as recoverContextFromEnv } from './shared/test-utils.1e170326.mjs';
1
+ import { u as useTestContext, a as url, c as createTestContext, s as setTestContext, b as stopServer, d as startServer } from './shared/test-utils.88b1fbfd.mjs';
2
+ export { $ as $fetch, e as exposeContextToEnv, f as fetch, i as isDev, r as recoverContextFromEnv } from './shared/test-utils.88b1fbfd.mjs';
3
3
  import { consola } from 'consola';
4
4
  import { promises, existsSync } from 'node:fs';
5
5
  import { resolve } from 'node:path';
@@ -57,7 +57,7 @@ const kit = _kit.default || _kit;
57
57
  async function startServer() {
58
58
  const ctx = useTestContext();
59
59
  await stopServer();
60
- const port = await getRandomPort();
60
+ const port = ctx.options.port || await getRandomPort();
61
61
  ctx.url = "http://127.0.0.1:" + port;
62
62
  if (ctx.options.dev) {
63
63
  const nuxiCLI = await kit.resolvePath("nuxi/cli");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/test-utils",
3
- "version": "3.4.3",
3
+ "version": "3.5.0",
4
4
  "repository": "nuxt/nuxt",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -25,21 +25,21 @@
25
25
  "get-port-please": "^3.0.1",
26
26
  "ofetch": "^1.0.1",
27
27
  "pathe": "^1.1.0",
28
- "ufo": "^1.1.1",
29
- "@nuxt/kit": "3.4.3",
30
- "@nuxt/schema": "3.4.3"
28
+ "ufo": "^1.1.2",
29
+ "@nuxt/schema": "3.5.0",
30
+ "@nuxt/kit": "3.5.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@jest/globals": "^29.5.0",
34
34
  "playwright": "^1.33.0",
35
35
  "unbuild": "latest",
36
- "vitest": "^0.30.1"
36
+ "vitest": "^0.31.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@jest/globals": "^29.5.0",
40
40
  "playwright": "^1.33.0",
41
- "vitest": "^0.30.1",
42
- "vue": "^3.2.47"
41
+ "vitest": "^0.31.0",
42
+ "vue": "^3.3.2"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "@jest/globals": {