fix(dev): isolate internal test overrides · nuxt/cli@5eee806 · GitHub
Skip to content

Commit 5eee806

Browse files
committed
fix(dev): isolate internal test overrides
1 parent f850a17 commit 5eee806

4 files changed

Lines changed: 47 additions & 22 deletions

File tree

‎packages/nuxt-cli/src/commands/dev-child.ts‎

Lines changed: 4 additions & 7 deletions

‎packages/nuxt-cli/src/commands/dev.ts‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -438,15 +438,6 @@ function parsePositiveInteger(value: string | undefined): number | undefined {
438438
}
439439

440440
function resolveListenOverrides(args: ParsedArgs<ArgsT>): DevListenOverrides {
441-
// _PORT is used by `@nuxt/test-utils` to launch the dev server on a specific port
442-
if (process.env._PORT) {
443-
return {
444-
port: process.env._PORT || 0,
445-
hostname: '127.0.0.1',
446-
showURL: false,
447-
} as const
448-
}
449-
450441
const httpsOptions: HTTPSOptions = {
451442
cert: args['https.cert']
452443
|| args.sslCert

‎packages/nuxt-cli/test/e2e/hidden-commands.spec.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ const bins = {
1010
'nuxi': join(fileURLToPath(new URL('../../../nuxi', import.meta.url)), 'bin/nuxi.mjs'),
1111
}
1212

13-
/**
14-
* Commands that must stay dispatchable but are kept out of help output.
15-
*
16-
* `_dev` is spawned by `@nuxt/test-utils` (see its `src/e2e/server.ts`) and
17-
* `start` is a long-standing alias of `preview`.
18-
*/
1913
const hiddenCommands = ['_dev', 'start'] as const
2014

2115
function run(bin: string, args: string[]) {
Lines changed: 43 additions & 0 deletions

0 commit comments

Comments
 (0)