@vitest/browser-playwright 4.0.10 → 4.0.11

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 (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +16 -11
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -45,4 +45,4 @@ Then run Vitest in the browser mode:
45
45
  npx vitest --browser
46
46
  ```
47
47
 
48
- [GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/browser-playwright) | [Documentation](https://vitest.dev/guide/browser/playwright)
48
+ [GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/browser-playwright) | [Documentation](https://vitest.dev/config/browser/playwright)
package/dist/index.js CHANGED
@@ -638,18 +638,23 @@ const annotateTraces = async ({ project }, { testId, traces }) => {
638
638
  const vitest = project.vitest;
639
639
  await Promise.all(traces.map((trace) => {
640
640
  const entity = vitest.state.getReportedEntityById(testId);
641
- return vitest._testRun.annotate(testId, {
642
- message: relative(project.config.root, trace),
643
- type: "traces",
644
- attachment: {
645
- path: trace,
646
- contentType: "application/octet-stream"
641
+ const location = entity?.location ? {
642
+ file: entity.module.moduleId,
643
+ line: entity.location.line,
644
+ column: entity.location.column
645
+ } : undefined;
646
+ return vitest._testRun.recordArtifact(testId, {
647
+ type: "internal:annotation",
648
+ annotation: {
649
+ message: relative(project.config.root, trace),
650
+ type: "traces",
651
+ attachment: {
652
+ path: trace,
653
+ contentType: "application/octet-stream"
654
+ },
655
+ location
647
656
  },
648
- location: entity?.location ? {
649
- file: entity.module.moduleId,
650
- line: entity.location.line,
651
- column: entity.location.column
652
- } : undefined
657
+ location
653
658
  });
654
659
  }));
655
660
  };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@vitest/browser-playwright",
3
3
  "type": "module",
4
- "version": "4.0.10",
4
+ "version": "4.0.11",
5
5
  "description": "Browser running for Vitest using playwright",
6
6
  "license": "MIT",
7
7
  "funding": "https://opencollective.com/vitest",
8
- "homepage": "https://vitest.dev/guide/browser/playwright",
8
+ "homepage": "https://vitest.dev/config/browser/playwright",
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/vitest-dev/vitest.git",
@@ -42,7 +42,7 @@
42
42
  ],
43
43
  "peerDependencies": {
44
44
  "playwright": "*",
45
- "vitest": "4.0.10"
45
+ "vitest": "4.0.11"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "playwright": {
@@ -51,12 +51,12 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "tinyrainbow": "^3.0.3",
54
- "@vitest/mocker": "4.0.10",
55
- "@vitest/browser": "4.0.10"
54
+ "@vitest/browser": "4.0.11",
55
+ "@vitest/mocker": "4.0.11"
56
56
  },
57
57
  "devDependencies": {
58
58
  "playwright": "^1.56.1",
59
- "vitest": "4.0.10"
59
+ "vitest": "4.0.11"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "premove dist && pnpm rollup -c",