vitest 2.0.5 → 2.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/browser.d.ts +3 -3
  2. package/dist/browser.js +1 -1
  3. package/dist/chunks/RandomSequencer.B4M2ux5b.js +952 -0
  4. package/dist/chunks/{base.DSsbfkDg.js → base.BH-FAiX7.js} +1 -1
  5. package/dist/chunks/{base.CC5R_kgU.js → base.BYvKfYzm.js} +2 -2
  6. package/dist/chunks/{benchmark.DDmpNjj-.js → benchmark.C8CRJYG4.js} +1 -1
  7. package/dist/chunks/{cac.DGgmCKmU.js → cac.CaYKA7Wt.js} +9 -8
  8. package/dist/chunks/{cli-api.OKfd3qJ0.js → cli-api.B8LE391_.js} +221 -4329
  9. package/dist/chunks/{config.DCnyCTbs.d.ts → config.CHuotKvS.d.ts} +3 -0
  10. package/dist/chunks/{console.Bgn7_A1x.js → console.DI3gHgtH.js} +1 -1
  11. package/dist/chunks/{creator.a3OfuIEW.js → creator.GreKbaUc.js} +2 -3
  12. package/dist/chunks/{env.BU041cs9.js → env.CmHVDJnw.js} +1 -1
  13. package/dist/chunks/{execute.Cjlr2CRw.js → execute.DT9BA6zp.js} +7 -7
  14. package/dist/chunks/{globals.BliuJFNR.js → globals.DRPLtPOv.js} +6 -6
  15. package/dist/chunks/{index.BfeNhc0N.js → index.CNZXZ9PJ.js} +2 -2
  16. package/dist/chunks/{index.DYufA6CZ.js → index.CxRxs566.js} +1 -1
  17. package/dist/chunks/{index.R1VjssW9.js → index.CxWPpGJz.js} +2 -2
  18. package/dist/chunks/{index.JbiJutJ_.js → index.YuPJueCg.js} +25 -965
  19. package/dist/chunks/{node.DS3zEPa7.js → node.Bx4JZjMG.js} +1 -1
  20. package/dist/chunks/{reporters.C_zwCd4j.d.ts → reporters.DRZ7ndzr.d.ts} +14 -1
  21. package/dist/chunks/resolveConfig.CGobt8AB.js +8120 -0
  22. package/dist/chunks/{runBaseTests.CyvqmuC9.js → runBaseTests.BAhL8UH_.js} +9 -9
  23. package/dist/chunks/{setup-common.CNzatKMx.js → setup-common.KBrCO5LJ.js} +1 -1
  24. package/dist/chunks/{utils.DpP_sDwr.js → utils.DO38lwfj.js} +1 -1
  25. package/dist/chunks/{vi.fiQ7lMRF.js → vi.B6QZ938s.js} +2 -2
  26. package/dist/chunks/{vm.DcSuuaHr.js → vm.kl9T_5ai.js} +3 -3
  27. package/dist/chunks/{worker.C5iHKIaJ.d.ts → worker.BANO5ak1.d.ts} +1 -1
  28. package/dist/chunks/{worker.DKkAC4Qw.d.ts → worker.Cx2xE71X.d.ts} +1 -1
  29. package/dist/cli.js +2 -2
  30. package/dist/config.d.ts +2 -2
  31. package/dist/coverage.d.ts +2 -2
  32. package/dist/coverage.js +34 -14
  33. package/dist/execute.d.ts +2 -2
  34. package/dist/execute.js +2 -2
  35. package/dist/index.d.ts +6 -6
  36. package/dist/index.js +7 -7
  37. package/dist/node.d.ts +5 -5
  38. package/dist/node.js +19 -18
  39. package/dist/reporters.d.ts +2 -2
  40. package/dist/reporters.js +10 -9
  41. package/dist/runners.d.ts +9 -2
  42. package/dist/runners.js +5 -5
  43. package/dist/snapshot.js +2 -2
  44. package/dist/suite.js +3 -3
  45. package/dist/worker.js +1 -1
  46. package/dist/workers/forks.js +3 -3
  47. package/dist/workers/runVmTests.js +8 -8
  48. package/dist/workers/threads.js +3 -3
  49. package/dist/workers/vmForks.js +5 -5
  50. package/dist/workers/vmThreads.js +5 -5
  51. package/dist/workers.d.ts +4 -4
  52. package/dist/workers.js +6 -6
  53. package/package.json +14 -15
  54. package/dist/chunks/index.BMmMjLIQ.js +0 -3975
@@ -3,7 +3,7 @@ import 'pathe';
3
3
  import '@vitest/runner/utils';
4
4
  import '@vitest/utils';
5
5
  import { g as getWorkerState } from './utils.Ck2hJTRs.js';
6
- import './env.BU041cs9.js';
6
+ import './env.CmHVDJnw.js';
7
7
  import 'std-env';
8
8
 
9
9
  class VitestNodeSnapshotEnvironment extends NodeSnapshotEnvironment {
@@ -3,7 +3,7 @@ import { File, Test, Suite, TaskResultPack, Task, CancelReason, Custom, TaskMeta
3
3
  import * as vite from 'vite';
4
4
  import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, ConfigEnv, ServerOptions, DepOptimizationConfig, AliasOptions } from 'vite';
5
5
  import { PrettyFormatOptions } from '@vitest/pretty-format';
6
- import { S as SerializedConfig, F as FakeTimerInstallOpts } from './config.DCnyCTbs.js';
6
+ import { S as SerializedConfig, F as FakeTimerInstallOpts } from './config.CHuotKvS.js';
7
7
  import { RawSourceMap, ViteNodeServerOptions } from 'vite-node';
8
8
  import { SnapshotSummary, SnapshotStateOptions } from '@vitest/snapshot';
9
9
  import { b as Awaitable, P as ProvidedContext, U as UserConsoleLog, A as AfterSuiteRunMeta, c as Arrayable, d as ArgumentsType, O as OnServerRestartHandler, f as EnvironmentOptions } from './environment.0M5R1SX_.js';
@@ -464,6 +464,16 @@ interface BrowserConfigOptions {
464
464
  */
465
465
  height: number;
466
466
  };
467
+ /**
468
+ * Locator options
469
+ */
470
+ locators?: {
471
+ /**
472
+ * Attribute used to locate elements by test id
473
+ * @default 'data-testid'
474
+ */
475
+ testIdAttribute?: string;
476
+ };
467
477
  /**
468
478
  * Directory where screenshots will be saved when page.screenshot() is called
469
479
  * If not set, all screenshots are saved to __screenshots__ directory in the same folder as the test file.
@@ -564,6 +574,9 @@ interface ResolvedBrowserOptions extends BrowserConfigOptions {
564
574
  height: number;
565
575
  };
566
576
  screenshotFailures: boolean;
577
+ locators: {
578
+ testIdAttribute: string;
579
+ };
567
580
  }
568
581
 
569
582
  declare class TestProject {