You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### TL;DR
Update Vitest from v3.2.4 to v4.0.3 and update related CLI options and configuration.
### What changed?
- Updated Vitest from v3.2.4 to v4.0.3
- Updated `@vitest/browser` from v3.2.4 to v4.0.1
- Updated CLI options in the snap tests:
- Added `--execArgv` and `--vmMemoryLimit` options
- Removed `--workspace`, `--poolOptions`, and `--minWorkers` options
- Updated reporter list to include "tree" and remove "basic"
- Updated `--standalone` description to clarify behavior with CLI file filters
- Updated browser mode configuration in snap tests to use the new provider API format
- Fixed the Vitest binary resolution in `resolve-test.ts` to use package.json path
- Added package.json configuration for the browser mode snap test
### How to test?
1. Run the CLI snap tests to verify the updated command options work correctly
2. Test the browser mode functionality with the new provider API format
3. Verify that the Vitest binary is correctly resolved in different environments
### Why make this change?
This update brings in the latest version of Vitest with improved features and API changes. The changes to the CLI options reflect the evolution of Vitest's configuration options, with some deprecated options being removed and new ones being added. The browser provider API has been updated to a more flexible format, and the binary resolution has been improved to be more reliable across different environments.
Copy file name to clipboardExpand all lines: packages/cli/snap-tests/command-helper/snap.txt
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -239,20 +239,19 @@ Options:
239
239
--api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204. Use '--help --api' for more info.
240
240
--silent [value] Silent console output from tests. Use 'passed-only' to see logs from failing tests only.
--outputFile <filename/-s> Write test results to a file when supporter reporter is also specified, use cac's dot notation for individual outputs of multiple reporters (example: --outputFile.tap=./tap.txt)
244
244
--coverage Enable coverage report. Use '--help --coverage' for more info.
245
245
--mode <name> Override Vite mode (default: test or benchmark)
246
-
--workspace <path> [deprecated] Path to a workspace configuration file
247
246
--isolate Run every test file in isolation. To disable isolation, use --no-isolate (default: true)
248
247
--globals Inject apis globally
249
248
--dom Mock browser API with happy-dom
250
249
--browser <name> Run tests in the browser. Equivalent to --browser.enabled (default: false). Use '--help --browser' for more info.
251
250
--pool <pool> Specify pool, if not running in the browser (default: forks)
252
-
--poolOptions <options> Specify pool options. Use '--help --poolOptions' for more info.
251
+
--execArgv <option> Pass additional arguments to node process when spawning worker_threads or child_process.
252
+
--vmMemoryLimit <limit> Memory limit for VM pools. If you see memory leaks, try to tinker this value.
253
253
--fileParallelism Should all test files run in parallel. Use --no-file-parallelism to disable (default: true)
254
254
--maxWorkers <workers> Maximum number or percentage of workers to run tests in
255
-
--minWorkers <workers> Minimum number or percentage of workers to run tests in
256
255
--environment <name> Specify runner environment, if not running in the browser (default: node)
257
256
--passWithNoTests Pass when no tests are found
258
257
--logHeapUsage Show the size of heap for each test when running in node
@@ -285,7 +284,7 @@ Options:
285
284
--no-color Removes colors from the console output (default: true)
286
285
--clearScreen Clear terminal screen when re-running tests during watch mode (default: true)
287
286
--configLoader <loader> Use bundle to bundle the config with esbuild or runner (experimental) to process it on the fly. This is only available in vite version <semver> and above. (default: bundle)
288
-
--standalone Start Vitest without running tests. File filters will be ignored, tests will be running only on change (default: false)
287
+
--standalone Start Vitest without running tests. Tests will be running only on change. This option is ignored when CLI file filters are passed. (default: false)
289
288
--mergeReports [path] Path to a blob reports directory. If this options is used, Vitest won't run any tests, it will only report previously recorded tests
0 commit comments