mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
unify exports in a single place
This commit is contained in:
parent
392b362118
commit
9da26fb7e0
15 changed files with 264 additions and 440 deletions
|
@ -1,6 +1,6 @@
|
|||
import { decodePngMetadata, decodeSvgMetadata } from "../excalidraw/data/image";
|
||||
import type { ImportedDataState } from "../excalidraw/data/types";
|
||||
import * as utils from "../utils";
|
||||
import { exportToBlob, exportToSvg } from "../excalidraw/scene/export";
|
||||
import { API } from "../excalidraw/tests/helpers/api";
|
||||
|
||||
// NOTE this test file is using the actual API, unmocked. Hence splitting it
|
||||
|
@ -15,13 +15,14 @@ describe("embedding scene data", () => {
|
|||
|
||||
const sourceElements = [rectangle, ellipse];
|
||||
|
||||
const svgNode = await utils.exportToSvg({
|
||||
const svgNode = await exportToSvg({
|
||||
data: {
|
||||
elements: sourceElements,
|
||||
appState: {
|
||||
viewBackgroundColor: "#ffffff",
|
||||
gridModeEnabled: false,
|
||||
exportEmbedScene: true,
|
||||
exportBackground: true,
|
||||
},
|
||||
files: null,
|
||||
},
|
||||
|
@ -47,7 +48,7 @@ describe("embedding scene data", () => {
|
|||
|
||||
const sourceElements = [rectangle, ellipse];
|
||||
|
||||
const blob = await utils.exportToBlob({
|
||||
const blob = await exportToBlob({
|
||||
data: {
|
||||
elements: sourceElements,
|
||||
appState: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue