tailwindcss
tailwindcss copied to clipboard
Update vitest 2.0.5 → 2.1.5 (minor)
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ vitest (2.0.5 → 2.1.5) · Repo
Release Notes
2.1.5
🐞 Bug Fixes
dangerouslyIgnoreUnhandledErrorswithout base reporter - by @AriPerkkio in #6808 (0bf0a)- Capture
unhandledRejectioneven when base reporter is not used - by @AriPerkkio in #6812 (8878b)- Don't change the working directory when loading workspace projects - by @sheremet-va in #6811 (f0aea)
- Remove
sequence.concurrentfrom theRuntimeConfigtype - by @sheremet-va in #6880 (6af73)- Stop the runner before restarting, restart on workspace config change - by @sheremet-va in #6859 (b01df)
- Don't rerun on Esc or Ctrl-C during watch filter - by @hi-ogawa in #6895 (98f76)
- Print ssrTransform error - by @hi-ogawa in #6885 (4c96c)
- Throw an error and a warning if
.poll,.element,.rejects/.resolves, andlocator.*weren't awaited - by @sheremet-va in #6877 (93b67)- browser:
- Don't process the default css styles - by @sheremet-va in #6861 (0d67f)
- Support non US key input - by @hi-ogawa in #6873 (5969d)
- Stop the browser rpc when the pool is closed - by @sheremet-va in #6858 (9a0c9)
- Init browsers eagerly when tests are running - by @sheremet-va in #6876 (417bd)
- coverage:
- Report uncovered files when re-run by
enteror'a'- by @AriPerkkio in #6848 (487c8)- ui:
- vite-node:
- vitest:
- Use fetch() implementation from happy-dom - by @capricorn86 in #6879 (3c56f)
🏎 Performance
- Limit workspace project concurrency to available cores - by @sheremet-va in #6869 (f4c04)
View changes on GitHub
2.1.4
🚀 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.
- browser: Allow custom HTML path, respect plugins
transformIndexHtml- by @sheremet-va in #6725 (16902)🐞 Bug Fixes
- windows:
- Don't normalize drive case letter in root - by @sheremet-va in #6792 (b28cd)
- browser:
- Fix default browser port - by @hi-ogawa in #6700 (9c518)
- Optimize expect-type - by @sheremet-va in #6713 (07918)
- Don't polyfill process.env - by @sheremet-va in #6718 (da6d2)
- Increment browser port automatically if there are several projects with browser.enabled - by @sheremet-va in #6717 (a9397)
- Cleanup keyboard state - by @hi-ogawa in #6731 (19278)
- Don't add
v=queries to setup files imports - by @sheremet-va in #6759 (b8258)- User event cleanup on retry - by @hi-ogawa in #6764 (bdd15)
- Ignore non mocked msw requests - by @sheremet-va in #6770 (9d9ba)
- Initiate MSW in the same frame as tests - by @sheremet-va in #6772 (2444f)
- deps:
- expect:
- mocker:
- Remove spy from peer dependencies - by @sheremet-va in #6777 (3a8b5)
- vitest:
- Clarify slowTestThreshold, print slow tests in non-TTY mode - by @sheremet-va in #6715 (2e6aa)
- Print warnings form Vite plugins - by @sheremet-va in #6724 (121b1)
- Don't fail if the working directory starts with a lowercase drive letter - by @sheremet-va in #6779 (df6d7)
- Silence import analysis warning - by @hi-ogawa in #6785 (39041)
- vitest,runner:
🏎 Performance
View changes on GitHub
2.1.3
🐞 Bug Fixes
- Fix error diff of
toBeNaN, toBeUndefined, toBeNull, toBeTruthy, toBeFalsy- by @hi-ogawa in #6697 (e0027)- browser:
- Provide aria role intellisense - by @sheremet-va in #6629 (f36ea)
- Not.toBeInTheDocument works with locators API - by @sheremet-va in #6634 (8bef5)
- Use
/mockServiceWorker.jsinstead of/__vitest_msw__- by @sheremet-va in #6687 (4b2ce)- Don't override the esbuild option in the browser mode - by @sheremet-va in #6692 (d131f)
- expect:
- mocker:
- Specify correct spy dependency - by @sheremet-va (7e958)
- runner:
- vitest:
- Deprecate UserConfig in favor of ViteUserConfig - by @sheremet-va in #6626 (496bd)
- Don't hang with maxConcurrency 0 - by @sheremet-va in #6627 (946d8)
- Deprecate old task types and node-reliant types - by @sheremet-va in #6632 (00045)
- Fix
<empty line>logs when interleavingconsole.log/error- by @hi-ogawa in #6644 (9ece3)- Show rollup error details as test error - by @hi-ogawa in #6686 (47dde)
- Always inline setup files - by @sheremet-va in #6689 (19d64)
- Use
fast-globinstead oftinyglobbyin Vitest - by @sheremet-va in #6688 (70baa)- web-worker:
🏎 Performance
- Reuse full name in reported tasks, update generator types - by @sheremet-va in #6666 (7a0de)
View changes on GitHub
2.1.2
🐞 Bug Fixes
- Move
Vitest.setServerto postconfigureServerhook to enable import analysis for workspace config loading - by @hi-ogawa in #6584 (e7f35)- benchmark:
- Clear
BenchmarkResult.samplesarray to reduce memory usage - by @hi-ogawa and @AriPerkkio in #6541 (a6407)- browser:
- Fix dynamic import inside worker - by @hi-ogawa in #6569 (ea2d4)
- Fix browser mock factory event race condition - by @hi-ogawa in #6530 (f131f)
- Serve ui assets as static - by @hi-ogawa in #6564 (adcda)
- Update solidjs testing library lib - by @CamilleTeruel in #6548 (91442)
- Use
data:protocol on preview provider file upload - by @userquin in #6501 (e9821)- Fix base for client script - by @hi-ogawa in #6510 (f9528)
- Throw an error if "@vitest/browser/context" is imported outside of the browser mode - by @sheremet-va in #6570 (383f1)
- coverage:
- Remove empty coverage folder on test failure too - by @AriPerkkio in #6547 (1371c)
- Include
*.astroby default - by @AriPerkkio in #6565 (f8ff7)cleanOnRerun: falseto invalidate previous results - by @AriPerkkio in #6592 (88bde)- expect:
- runner:
- Mark tests as skipped when
beforeAllfailed - by @hi-ogawa in #6524 (fb797)- Support fixture parsing of lowered async syntax - by @hi-ogawa in #6531 (b553c)
- Fix fixture parsing of lowered async syntax for non arrow functions - by @hi-ogawa in #6575 (3de00)
- Guard test hook callback - by @sheremet-va in #6604 (14971)
- Run
onTestFinishedandonTestFailedduringretryandrepeats- by @hi-ogawa in #6609 (c5e29)- ui:
- vite-node:
- vitest:
- Install dependencies with the same version when prompted - by @sheremet-va in #6611 (ed8b7)
- Make env.SSR consistent between different pools - by @sheremet-va in #6616 (8a8d3)
- Don't start a websocket server if api is disabled - by @sheremet-va in #6617 (82140)
- workspace:
View changes on GitHub
2.1.1
🐞 Bug Fixes
- browser:
- workspace:
- Resolve glob pattern once to avoid name collision - by @sheremet-va in #6489 (36b5a)
View changes on GitHub
2.1.0
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
pageobject 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.tsorvite.config.tsinside the folder)- For example,
projects/*will match anything inside theprojectsfolder. 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
- api:
- Make spec into a class instead of a tuple - by @sheremet-va in #6355 (874a1)
- browser:
- Move page.config to server.config, add more docs - by @sheremet-va in #6252 (af2b8)
- Make iframe scalable, improve documentation - by @sheremet-va in #6257 (74ca1)
- Introduce built-in locators - by @sheremet-va in #6084 (3347f)
- Support v8 coverage - by @AriPerkkio in #6273 (34199)
- Support
userEvent.uploadin playwright provider - by @sheremet-va in #6442 (cf148)- Support
--inspect- by @AriPerkkio in #6433 (0499a)- Support
--inspect-brk- by @AriPerkkio in #6434 (7ab0f)- cli:
- Extend existing list command to output only a list of file names - by @Ma-hawaj and @sheremet-va in #6392 (008f0)
- coverage:
- Add
--exclude-after-remap- by @AriPerkkio in #6309 (5932a)- mocker:
- Introduce @vitest/mocker package, allow
{ spy: true }instead of a factory - by @sheremet-va in #6289 (95f02)- vitest:
- Add "provide" option - by @sheremet-va in #6253 (4409d)
- Add return type and promisable mockFactory - by @syi0808 and @sheremet-va in #6139 (f5e0b)
- Add
vi.advanceTimersToNextFrame- by @bnjm and @sheremet-va in #6347 (8ff63)- Allow env to be stubbed to undefined - by @JSanchezIO and @sheremet-va in #6359 (c3b27)
🐞 Bug Fixes
- Correctly resolve nested mocks with
indexfile - by @sheremet-va in #6266 (081cf)- Don't panic when coverage.reporter is a string - by @sheremet-va in #6267 (7b37d)
- Align RawMatcherFn type definition with Jest - by @wheresrhys in #6351 (d09f0)
- Cjs build of vite node server - by @AkaraChen in #6389 (12e70)
- Allow inlining vite's cached dependencies - by @chriswheeldon-peakon in #6284 (03208)
- Print unexpected error message if peer dependencies have a different version - by @sheremet-va in #6446 (b992b)
- Ignore importer when resolving Vitest - by @sheremet-va in #6469 (0b447)
expect.getState().testPathalways returns correct path - by @sheremet-va in #6472 (ac698)- UserEvent works consistently between providers - by @sheremet-va in #6480 (0b4da)
- browser:
- Print correct stack trace for unhandled errors - by @sheremet-va in #6134 (1da6c)
- Use documentElement as the root for selector - by @sheremet-va (d8077)
- Keep querying elements even if locator is created with elementLocator, add pubic @vitest/browser/utils - by @sheremet-va in #6296 (30dc5)
- Produce valid config file if preview provider is used - by @sheremet-va in #6305 (7f0ae)
- Correctly run in-source tests in the browser - by @sheremet-va in #6440 (c8531)
- Exclude missed packages from optimization, print help message - by @sheremet-va in #6445 (8d883)
- Define mocker as a dependency - by @sheremet-va in #6476 (9560a)
- coverage:
- Warn if
vitestand@vitest/*versions don't match - by @AriPerkkio in #6317 (e662c)- V8 to support source maps with multiple sources - by @AriPerkkio and @sheremet-va in #6120 (1f6cb)
- V8 to warn instead of crash when conversion fails - by @AriPerkkio in #6318 (91dea)
- Use project specific
vitenodefor uncovered files - by @AriPerkkio in #6044 (da52d)- runner:
- snapshot:
- typecheck:
- Run both runtime and typecheck tests if
typecheck.includeoverlaps withinclude- by @sheremet-va in #6256 (153ff)- types:
- ui:
- Remove "filters" flickering - by @sheremet-va in #6463 (0223b)
- Render project name consistently - by @sheremet-va in #6329 (94a18)
- vite-node:
- vitest:
- Update json reporter output - by @Emiyaaaaa in #6064 (c9979)
- Add more type guards for --merge-reports - by @sheremet-va in #6307 (0a5d8)
- Always resolve vitest to the root version - by @sheremet-va in #6369 (163d7)
- Dispose vmForks listeners to avoid memory leak - by @sheremet-va in #6448 (2673c)
View changes on GitHub
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.
All Depfu comment commands
- @depfu rebase
- Rebases against your default branch and redoes this update
- @depfu recreate
- Recreates this PR, overwriting any edits that you've made to it
- @depfu merge
- Merges this PR once your tests are passing and conflicts are resolved
- @depfu cancel merge
- Cancels automatic merging of this PR
- @depfu close
- Closes this PR and deletes the branch
- @depfu reopen
- Restores the branch and reopens this PR (if it's closed)
- @depfu pause
- Ignores all future updates for this dependency and closes this PR
- @depfu pause [minor|major]
- Ignores all future minor/major updates for this dependency and closes this PR
- @depfu resume
- Future versions of this dependency will create PRs again (leaves this PR as is)