Skip to content

chore(babel-config): switch to vitest #10361

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 2 commits into from
Apr 2, 2024
Merged

Conversation

Josh-Walker-GM
Copy link
Contributor

@Josh-Walker-GM Josh-Walker-GM commented Mar 29, 2024

This PR changes the @redwoodjs/babel-config to use vitest instead of jest.

The changes needed here:

  1. Switch dependencies and package json tasks
  2. Add basic vitest config
  3. Update inline snapshot for dist test
  4. Update the mocks to use vi
  5. The most controversial of them all, I had to move a __fixtures__ directory up a level. This is because the 'babel-plugin-tester' is expecting that directory to include tests when it is at the existing level. It does not contain any tests so vitest will fail as it doesn't allow suites without tests.

@Josh-Walker-GM Josh-Walker-GM added release:chore This PR is a chore (means nothing for users) changesets-ok Override the changesets check labels Mar 29, 2024
@Josh-Walker-GM Josh-Walker-GM added this to the chore milestone Mar 29, 2024
@Josh-Walker-GM Josh-Walker-GM self-assigned this Mar 29, 2024
@Josh-Walker-GM Josh-Walker-GM marked this pull request as ready for review March 29, 2024 00:31
@Josh-Walker-GM Josh-Walker-GM requested a review from jtoar April 2, 2024 00:22
Copy link
Contributor

@jtoar jtoar left a comment

Choose a reason for hiding this comment

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

I see what you mean about the nested __fixtures__; didn't realize it was hiding in import-dir at first.

@jtoar jtoar merged commit a9d3fb3 into main Apr 2, 2024
@jtoar jtoar deleted the jgmw-chore/babel-config-vitest branch April 2, 2024 07:52
dac09 added a commit to dac09/redwood that referenced this pull request Apr 2, 2024
…nto feat/register-middleware

* 'feat/register-middleware' of github.com:dac09/redwood:
  feat(router): Allow redirect routes to use route names as target (redwoodjs#10376)
  chore(babel-config): switch to vitest (redwoodjs#10361)
  docs(redirect): Add docs for redirect routes (redwoodjs#10374)
  chore(changesets): Automatically find PR number (redwoodjs#10377)
  chore(deps): Upgrade `lru-cache` (redwoodjs#10378)
  chore(e2e): use tarsync for syncing framework state to project (redwoodjs#10379)
Josh-Walker-GM added a commit that referenced this pull request Apr 2, 2024
This PR changes the `@redwoodjs/babel-config` to use vitest instead of
jest.

The changes needed here:
1. Switch dependencies and package json tasks
2. Add basic vitest config
3. Update inline snapshot for dist test
4. Update the mocks to use `vi` 
5. The most controversial of them all, I had to move a `__fixtures__`
directory up a level. This is because the 'babel-plugin-tester' is
expecting that directory to include tests when it is at the existing
level. It does not contain any tests so vitest will fail as it doesn't
allow suites without tests.
@Josh-Walker-GM Josh-Walker-GM modified the milestones: chore, v8.0.0 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changesets-ok Override the changesets check release:chore This PR is a chore (means nothing for users)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants