@vitest/browser 5.0.0-beta.2 → 5.0.0-beta.4

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 (31) hide show
  1. package/context.d.ts +8 -0
  2. package/dist/client/.vite/manifest.json +8 -8
  3. package/dist/client/__vitest__/assets/index-B2jbgabi.js +139 -0
  4. package/dist/client/__vitest__/assets/index-CEyXAB_I.css +1 -0
  5. package/dist/client/__vitest__/index.html +2 -2
  6. package/dist/client/__vitest_browser__/defineProperty-C3k2g8Sk.js +267 -0
  7. package/dist/client/__vitest_browser__/orchestrator-B44yH1M4.js +343 -0
  8. package/dist/client/__vitest_browser__/rrweb-snapshot-iZCFA2to.js +4388 -0
  9. package/dist/client/__vitest_browser__/tester-kAU8uxhk.js +5086 -0
  10. package/dist/client/orchestrator.html +2 -2
  11. package/dist/client/tester/tester.html +2 -2
  12. package/dist/client/tester/trace.d.ts +9 -6
  13. package/dist/client.js +10 -1
  14. package/dist/context.js +53 -23
  15. package/dist/expect-element.js +30 -30
  16. package/dist/index.js +153 -33
  17. package/dist/locators-CPBpJv8y.js +5 -0
  18. package/dist/locators.js +1 -1
  19. package/dist/shared/screenshotMatcher/types.d.ts +2 -1
  20. package/dist/state.js +64 -14
  21. package/dist/types.d.ts +7 -2
  22. package/jest-dom.d.ts +26 -6
  23. package/matchers.d.ts +2 -1
  24. package/package.json +7 -7
  25. package/dist/client/__vitest__/assets/index-Cd6On2Pm.js +0 -136
  26. package/dist/client/__vitest__/assets/index-Dw9P28Qt.css +0 -1
  27. package/dist/client/__vitest_browser__/orchestrator-BfoS0x4w.js +0 -411
  28. package/dist/client/__vitest_browser__/rrweb-snapshot-xhvrgOHx.js +0 -5476
  29. package/dist/client/__vitest_browser__/tester-BJtW9QqZ.js +0 -5588
  30. package/dist/client/__vitest_browser__/utils-Nd8hqrhP.js +0 -189
  31. package/dist/locators-CesZ2RSY.js +0 -5
package/context.d.ts CHANGED
@@ -42,12 +42,20 @@ export interface ScreenshotOptions extends SelectorOptions {
42
42
  save?: boolean
43
43
  }
44
44
 
45
+ export type BrowserTraceEntryKind = 'action' | 'expect' | 'mark' | 'lifecycle'
46
+
45
47
  export interface MarkOptions {
46
48
  /**
47
49
  * Optional stack string used to resolve marker location.
48
50
  * Useful for wrapper libraries that need to forward the end-user callsite.
49
51
  */
50
52
  stack?: string
53
+
54
+ /**
55
+ * Optional marker kind that's used to categorize the marker in the trace viewer.
56
+ * @default 'mark'
57
+ */
58
+ kind?: BrowserTraceEntryKind
51
59
  }
52
60
 
53
61
  interface StandardScreenshotComparators {
@@ -1,30 +1,30 @@
1
1
  {
2
2
  "../../../../node_modules/.pnpm/rrweb-snapshot@2.0.0-alpha.20_patch_hash=d11ec9bd9b66247ba493ab5fd117fbf0b4cb6e5d0a6a7c600d1d844bfa3d3044/node_modules/rrweb-snapshot/dist/rrweb-snapshot.js": {
3
- "file": "__vitest_browser__/rrweb-snapshot-xhvrgOHx.js",
3
+ "file": "__vitest_browser__/rrweb-snapshot-iZCFA2to.js",
4
4
  "name": "rrweb-snapshot",
5
5
  "src": "../../../../node_modules/.pnpm/rrweb-snapshot@2.0.0-alpha.20_patch_hash=d11ec9bd9b66247ba493ab5fd117fbf0b4cb6e5d0a6a7c600d1d844bfa3d3044/node_modules/rrweb-snapshot/dist/rrweb-snapshot.js",
6
6
  "isDynamicEntry": true
7
7
  },
8
- "_utils-Nd8hqrhP.js": {
9
- "file": "__vitest_browser__/utils-Nd8hqrhP.js",
10
- "name": "utils"
8
+ "_defineProperty-C3k2g8Sk.js": {
9
+ "file": "__vitest_browser__/defineProperty-C3k2g8Sk.js",
10
+ "name": "defineProperty"
11
11
  },
12
12
  "orchestrator.html": {
13
- "file": "__vitest_browser__/orchestrator-BfoS0x4w.js",
13
+ "file": "__vitest_browser__/orchestrator-B44yH1M4.js",
14
14
  "name": "orchestrator",
15
15
  "src": "orchestrator.html",
16
16
  "isEntry": true,
17
17
  "imports": [
18
- "_utils-Nd8hqrhP.js"
18
+ "_defineProperty-C3k2g8Sk.js"
19
19
  ]
20
20
  },
21
21
  "tester/tester.html": {
22
- "file": "__vitest_browser__/tester-BJtW9QqZ.js",
22
+ "file": "__vitest_browser__/tester-kAU8uxhk.js",
23
23
  "name": "tester",
24
24
  "src": "tester/tester.html",
25
25
  "isEntry": true,
26
26
  "imports": [
27
- "_utils-Nd8hqrhP.js"
27
+ "_defineProperty-C3k2g8Sk.js"
28
28
  ],
29
29
  "dynamicImports": [
30
30
  "../../../../node_modules/.pnpm/rrweb-snapshot@2.0.0-alpha.20_patch_hash=d11ec9bd9b66247ba493ab5fd117fbf0b4cb6e5d0a6a7c600d1d844bfa3d3044/node_modules/rrweb-snapshot/dist/rrweb-snapshot.js"