mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Fix Node.js CI
After the Rust 1.78 release, napi-rs panics on zero-sized array buffers. Work around it by not allocating a zero-sized array buffer for this specific test. Upstream PR: napi-rs/napi-rs#2083
This commit is contained in:
parent
11b9d73762
commit
af070f306f
1 changed files with 2 additions and 2 deletions
|
@ -217,9 +217,9 @@ test('get/set image properties', async (t) => {
|
|||
message: "Cannot convert object to image, because the provided object does not have an u32 `height` property"
|
||||
});
|
||||
t.throws(() => {
|
||||
instance!.setProperty("external-image", { width: 1, height: 1, data: new Uint8ClampedArray() });
|
||||
instance!.setProperty("external-image", { width: 1, height: 1, data: new Uint8ClampedArray(1) });
|
||||
}, {
|
||||
message: "data property does not have the correct size; expected 1 (width) * 1 (height) * 4 = 0; got 4"
|
||||
message: "data property does not have the correct size; expected 1 (width) * 1 (height) * 4 = 1; got 4"
|
||||
});
|
||||
|
||||
t.is(image.bitmap.width, 64);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue