vitest-environment-webgpu-node 0.1.0 → 1.0.0
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.
- package/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## [vitest-environment-webgpu-node-v1.0.0](https://github.com/bhouston/vitest-gpu/compare/vitest-environment-webgpu-node-v0.1.0...vitest-environment-webgpu-node-v1.0.0) (2026-09-18)
|
|
2
|
+
|
|
3
|
+
### ⚠ BREAKING CHANGES
|
|
4
|
+
|
|
5
|
+
* **screenshot:** the matcher is async and must be awaited; reference paths need an image extension.
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **screenshot:** accept canvases, images and any image format in toMatchScreenshot ([edaabc4](https://github.com/bhouston/vitest-gpu/commit/edaabc43ac0ab895601565129a8db38121cfa5d3)), closes [#1](https://github.com/bhouston/vitest-gpu/issues/1)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **test:** set testTimeout explicitly on every vitest project ([49858e1](https://github.com/bhouston/vitest-gpu/commit/49858e1e84916e0852add97075666ffeb82c0e7b)), closes [#8](https://github.com/bhouston/vitest-gpu/issues/8)
|
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ const canvas = createCanvas(256, 256);
|
|
|
51
51
|
const renderer = new THREE.WebGPURenderer({ canvas: canvas.asElement() });
|
|
52
52
|
await renderer.init();
|
|
53
53
|
await renderer.renderAsync(scene, camera);
|
|
54
|
-
expect(
|
|
54
|
+
await expect(canvas).toMatchScreenshot('scene.png');
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
`readPixels()` returns `{ width, height, data }` RGBA8 pixels, ready for
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest-environment-webgpu-node",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Vitest environment that provides real headless WebGPU (Dawn via the webgpu package) in Node",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dawn",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
|
-
"build": "tsc
|
|
45
|
-
"tsc": "tsc
|
|
44
|
+
"build": "tsc",
|
|
45
|
+
"tsc": "tsc"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@webgpu/types": "^0.1.72",
|