diff --git a/packages/nuxt/src/core/nitro.ts b/packages/nuxt/src/core/nitro.ts index 9ca59458e1..bd9161666e 100644 --- a/packages/nuxt/src/core/nitro.ts +++ b/packages/nuxt/src/core/nitro.ts @@ -215,7 +215,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) { if (nuxt.options.experimental.appManifest) { // @ts-expect-error untyped nuxt property const buildId = nuxt.options.appConfig.nuxt!.buildId ||= - (nuxt.options.test ? 'test' : nuxt.options.dev ? 'dev' : randomUUID()) + (nuxt.options.dev ? 'dev' : nuxt.options.test ? 'test' : randomUUID()) const buildTimestamp = Date.now() const manifestPrefix = joinURL(nuxt.options.app.buildAssetsDir, 'builds') diff --git a/packages/schema/src/config/common.ts b/packages/schema/src/config/common.ts index 9f934cfb13..013a1da6fb 100644 --- a/packages/schema/src/config/common.ts +++ b/packages/schema/src/config/common.ts @@ -1,6 +1,6 @@ import { defineUntypedSchema } from 'untyped' import { join, relative, resolve } from 'pathe' -import { isDebug, isDevelopment } from 'std-env' +import { isDebug, isDevelopment, isTest } from 'std-env' import { defu } from 'defu' import { findWorkspaceDir } from 'pkg-types' import type { RuntimeConfig } from '../types/config' @@ -158,7 +158,7 @@ export default defineUntypedSchema({ /** * Whether your app is being unit tested. */ - test: Boolean(isDevelopment), + test: Boolean(isTest), /** * Set to `true` to enable debug mode.