From 628d7705601babf543d240225bba2115c4199f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Exbrayat?= Date: Wed, 9 Feb 2022 16:19:08 +0100 Subject: [PATCH] fix: default reporters should be an array Fixes #718 This fixes the error `TypeError: target[key].push is not a function` that occurs when a config is defined with reporters. This is because the deepMerge function tries to merge the given array of reporters with the default config, which is the string `"default"`. By fixing the default config to be an array of reporters, only containing the default one, the issue is fixed. --- packages/vitest/src/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vitest/src/constants.ts b/packages/vitest/src/constants.ts index d9c6c3d78cbe..913a436ac0b4 100644 --- a/packages/vitest/src/constants.ts +++ b/packages/vitest/src/constants.ts @@ -50,7 +50,7 @@ export const configDefaults: UserConfig = Object.freeze({ watchIgnore: [/\/node_modules\//, /\/dist\//], update: false, watch: !process.env.CI, - reporters: 'default', + reporters: ['default'], silent: false, api: false, ui: false,