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

Docs: missing info about defineConfig() merging user configs with default configs #4423

Closed
6 tasks done
bobaaaaa opened this issue Nov 2, 2023 · 2 comments
Closed
6 tasks done
Labels
documentation Improvements or additions to documentation pr welcome

Comments

@bobaaaaa
Copy link

bobaaaaa commented Nov 2, 2023

Describe the bug

It is not clear to me if my options for defineConfig() will be merged with the default options. A short info about this would be helpful for me.

Example:

Is this the correct why to add an exclude path for the coverage option?

import { defineConfig, coverageConfigDefaults } from 'vitest/config';

export default defineConfig({
  test: {
    coverage: {
      exclude: [...coverageConfigDefaults.exclude, '**/foo.ts'],
    },
  },
});

I also checked the vite docs about this.

PS: love vitest ❤️

Reproduction

only about docs

System Info

vitest 1.0.0-beta.3

Used Package Manager

yarn

Validations

@sheremet-va
Copy link
Member

sheremet-va commented Nov 2, 2023

I am not sure what you mean. All your options always override default options otherwise it wouldn't be possible to override them.

@bobaaaaa
Copy link
Author

bobaaaaa commented Nov 2, 2023

I am not sure what you mean. All your options always override default options otherwise it wouldn't be possible to override them.

Ok, I thought so, but it is not clear in the docs to me. This is my first project with vitest. Sorry if this is a stupid question.

@sheremet-va sheremet-va added documentation Improvements or additions to documentation pr welcome and removed pending triage labels Nov 2, 2023
@sheremet-va sheremet-va closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation pr welcome
Projects
None yet
Development

No branches or pull requests

2 participants