mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: cleanup svg export and move payload to <metadata>
(#8975)
This commit is contained in:
parent
798c795405
commit
36274f1f3e
10 changed files with 220 additions and 186 deletions
|
@ -1,7 +1,8 @@
|
|||
import { decodePngMetadata, decodeSvgMetadata } from "../excalidraw/data/image";
|
||||
import type { ImportedDataState } from "../excalidraw/data/types";
|
||||
import * as utils from "../utils";
|
||||
import { API } from "../excalidraw/tests/helpers/api";
|
||||
import { decodeSvgBase64Payload } from "../excalidraw/scene/export";
|
||||
import { decodePngMetadata } from "../excalidraw/data/image";
|
||||
|
||||
// NOTE this test file is using the actual API, unmocked. Hence splitting it
|
||||
// from the other test file, because I couldn't figure out how to test
|
||||
|
@ -27,7 +28,7 @@ describe("embedding scene data", () => {
|
|||
|
||||
const svg = svgNode.outerHTML;
|
||||
|
||||
const parsedString = decodeSvgMetadata({ svg });
|
||||
const parsedString = decodeSvgBase64Payload({ svg });
|
||||
const importedData: ImportedDataState = JSON.parse(parsedString);
|
||||
|
||||
expect(sourceElements.map((x) => x.id)).toEqual(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue