Skip to content

Releases: vitest-dev/vitest

v2.1.6

26 Nov 12:24
b936702
Compare
Choose a tag to compare

🚀 Features

  • Support Vite 6
    View changes on GitHub

v2.2.0-beta.2

18 Nov 14:18
ad8e35d
Compare
Choose a tag to compare
v2.2.0-beta.2 Pre-release
Pre-release

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v2.2.0-beta.1

13 Nov 17:17
b915aa6
Compare
Choose a tag to compare
v2.2.0-beta.1 Pre-release
Pre-release

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v2.1.5

13 Nov 15:24
32f23b9
Compare
Choose a tag to compare

   🐞 Bug Fixes

   🏎 Performance

    View changes on GitHub

v2.1.4

28 Oct 12:27
0df44c0
Compare
Choose a tag to compare

   🚀 Features

This patch release includes a non-breaking feature for the experimental Browser Mode that doesn't follow SemVer. If you want to avoid picking up releases like this, make sure to pin the Vitest version in your package.json. See npm's documentation about semver for more information.

   🐞 Bug Fixes

   🏎 Performance

    View changes on GitHub

v2.1.3

14 Oct 11:06
4c03a0d
Compare
Choose a tag to compare

   🐞 Bug Fixes

   🏎 Performance

    View changes on GitHub

v2.1.2

02 Oct 16:20
0ce26a4
Compare
Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v2.1.1

13 Sep 15:33
699055e
Compare
Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v2.1.0

12 Sep 14:04
9f1fd18
Compare
Choose a tag to compare

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 #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

Read more

v2.1.0-beta.7

09 Sep 15:13
b2be23e
Compare
Choose a tag to compare
v2.1.0-beta.7 Pre-release
Pre-release

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub