Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: default reporters should be an array #720

Merged
merged 1 commit into from Feb 9, 2022

Conversation

cexbrayat
Copy link
Contributor

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.

Fixes vitest-dev#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.
@netlify
Copy link

netlify bot commented Feb 9, 2022

✔️ Deploy Preview for vitest-dev ready!

🔨 Explore the source changes: 628d770

🔍 Inspect the deploy log: https://app.netlify.com/sites/vitest-dev/deploys/6203dc1ac30cc30007df9f98

😎 Browse the preview: https://deploy-preview-720--vitest-dev.netlify.app

@antfu antfu merged commit d02db1b into vitest-dev:main Feb 9, 2022
@cexbrayat cexbrayat deleted the fix/718-reporters branch February 9, 2022 16:53
chaii3 pushed a commit to chaii3/vitest that referenced this pull request May 13, 2022
Co-authored-by: LinusBorg <LinusBorg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

target[key].push is not a function (regression in v0.3.0)
2 participants