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

chore(deps): update vitest monorepo to v2.1.0 #2799

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 15, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@vitest/coverage-istanbul (source) 2.0.5 -> 2.1.0 age adoption passing confidence
@vitest/ui (source) 2.0.5 -> 2.1.0 age adoption passing confidence
vitest (source) 2.0.5 -> 2.1.0 age adoption passing confidence

Release Notes

vitest-dev/vitest (@​vitest/coverage-istanbul)

v2.1.0

Compare Source

This release makes another big change to the Browser Mode by introducing locators API:

test('renders blog posts', async () => {
  const screen = page.render(<Blog />)

  await expect.element(screen.getByRole('heading', { name: 'Blog' })).toBeInTheDocument()

  const [firstPost] = screen.getByRole('listitem').all()

  await firstPost.getByRole('button', { name: 'Delete' }).click()

  expect(screen.getByRole('listitem').all()).toHaveLength(3)
})

You can use either vitest-browser-vue, vitest-browser-svelte or vitest-browser-react to render components and make assertions using locators. Locators are also available on the page object from @vitest/browser/context.

Potential Breaking Change
  • workspace:
    • Correctly resolve workspace globs and file paths  -  by @​sheremet-va in https://github.com/vitest-dev/vitest/issues/6316 (afdcb)
    • This changes how the custom glob pattern in the workspace config is treated. Any file matching the glob is considered a Vitest config file. Any folder matching the glob pattern is treated as a workspace project and is subject to the regular config resolution (single vitest.config.ts or vite.config.ts inside the folder)
    • For example, projects/* will match anything inside the projects folder. If it's a folder, we try to find the config inside that folder (if there is none, it is still treated as a project with the default config). If it's a file, it will be treated as a Vitest config. projects/**/* previously would assume that you only wanted to have folders as projects, but now it will match every single file insideprojects.
    • This change doesn't affect non-glob usage.
   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Sep 15, 2024
@renovate renovate bot merged commit 2448ba8 into main Sep 15, 2024
41 checks passed
@renovate renovate bot deleted the renovate/vitest-monorepo branch September 15, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants