Skip to content

feat: vitest require assertions #647

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

Merged
merged 3 commits into from
Jul 26, 2025
Merged

Conversation

manuel3108
Copy link
Member

This came up in the maintainers chat. It's regarding this config: https://vitest.dev/config/#expect-requireassertions

If there is a test without an assertion, it will currently pass unnoticed. But then it's not a real test.

Paolo contacted the vitest team, and they said this was set as default a long time ago, to ease the migration process from Jest and so on. Since sv is used to create new projects and not to migrate old Jest projects, we are safe to set such useful constraints to the user.

This was mainly expected to change the vitest add-on, but I also change our internal vitest configs to avoid this in this repo as well.

Copy link

changeset-bot bot commented Jul 26, 2025

🦋 Changeset detected

Latest commit: 9adf655

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sv Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Jul 26, 2025

Open in StackBlitz

npx https://pkg.pr.new/sveltejs/cli/sv@647
npx https://pkg.pr.new/sveltejs/cli/svelte-migrate@647

commit: 9adf655

@manuel3108
Copy link
Member Author

manuel3108 commented Jul 26, 2025

Ok, let's not enforce this on migrate it causes to many errors and is not something we are currently actively working on.
Edit: and the same for create

@manuel3108 manuel3108 merged commit fd1f7cd into main Jul 26, 2025
7 checks passed
@manuel3108 manuel3108 deleted the feat/vitest-require-assertions branch July 26, 2025 12:26
@github-actions github-actions bot mentioned this pull request Jul 26, 2025
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.

1 participant