Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(vitest): add vitest cleanup export #294

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
yanick merged 1 commit into testing-library:main from mcous:feat-vitest-setup
Jan 27, 2024
Merged

feat(vitest): add vitest cleanup export #294

yanick merged 1 commit into testing-library:main from mcous:feat-vitest-setup
Jan 27, 2024

Conversation

@mcous
Copy link
Collaborator

@mcous mcous commented Jan 26, 2024
edited
Loading

Overview

This is the first PR in a series to add multiple Svelte versions and test runners to our CI test matrix.

  1. feat(vitest): add vitest cleanup export #294 <-- you are here
  2. ci: test against svelte v3 and v4 #295
  3. TODO add multiple Vitest environments to CI matrix
  4. TODO add Jest to CI matrix

Change log

This PR concentrates on getting Vitest fully working, since there are a few issues with the setup

  • Add @testing-library/svelte/vitest import, inspired by @testing-library/jest-dom/vitest to run auto-cleanup when using Vitest in non-global mode
    • Will require a docs update at some point
  • Upgrade testing-library/jest-dom so we can use @testing-library/jest-dom/vitest
  • Fix test scripts for watch mode and snapshot updates, which were still written with jest arguments
  • Fix Vitest coverage reports, which were not being generated in CI

Review requests

(削除) I'm keeping this PR in draft mode until I can verify that the @testing-library/svelte/vitest import works in a real project. Importing vitest in library code has given me issues before, so I want to verify before this is merged/released. It definitely works for our own test suite, though! (削除ここまで) Verified, works like a charm

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed / moved this file to avoid confusion with the src/vitest.js entrypoint

@mcous mcous changed the title (削除) feat(vitest): add vitest cleanup import (削除ここまで) (追記) feat(vitest): add vitest cleanup export (追記ここまで) Jan 26, 2024
@mcous mcous marked this pull request as ready for review January 27, 2024 10:34
@yanick yanick merged commit ee1b1f7 into testing-library:main Jan 27, 2024
Copy link

🎉 This PR is included in version 4.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /