From 71957ac6b7c9eac0ecfd6d52c2254cdbfadd3c61 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 10 Nov 2022 15:51:45 +0100 Subject: [PATCH] add json parse format --- packages/test-utils/src/context.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/test-utils/src/context.ts b/packages/test-utils/src/context.ts index cb4ff2b9689..849ff4d1591 100644 --- a/packages/test-utils/src/context.ts +++ b/packages/test-utils/src/context.ts @@ -49,7 +49,7 @@ export function isDev () { export function recoverContextFromEnv () { if (!currentContext && process.env.NUXT_TEST_CONTEXT) { - setTestContext(JSON.parse(process.env.NUXT_TEST_CONTEXT)) + setTestContext(JSON.parse(process.env.NUXT_TEST_CONTEXT || '{}')) } }