fix: restore svg image DataURL dimensions (#8730)

This commit is contained in:
David Luzar 2024-10-29 22:40:24 +01:00 committed by GitHub
parent f9815b8b4f
commit 79b181bcdc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 196 additions and 94 deletions

View file

@ -62,10 +62,10 @@ describe("export", () => {
});
it("test encoding/decoding scene for SVG export", async () => {
const encoded = await encodeSvgMetadata({
const encoded = encodeSvgMetadata({
text: serializeAsJSON(testElements, h.state, {}, "local"),
});
const decoded = JSON.parse(await decodeSvgMetadata({ svg: encoded }));
const decoded = JSON.parse(decodeSvgMetadata({ svg: encoded }));
expect(decoded.elements).toEqual([
expect.objectContaining({ type: "text", text: "😀" }),
]);