fix snaps

This commit is contained in:
Aakansha Doshi
2023-08-03 12:14:21 +05:30
parent e49c94f22f
commit 8aed24312f
2 changed files with 336 additions and 119 deletions
+27 -15
View File
@@ -55,11 +55,15 @@ describe("Test Transform", () => {
},
];
expect(
convertToExcalidrawElements(
elements as ExcalidrawProgrammaticAPI["elements"],
),
).toMatchSnapshot();
convertToExcalidrawElements(
elements as ExcalidrawProgrammaticAPI["elements"],
).forEach((ele) => {
expect(ele).toMatchSnapshot({
seed: expect.any(Number),
versionNonce: expect.any(Number),
id: expect.any(String),
});
});
});
it("should transform text element", () => {
@@ -79,11 +83,15 @@ describe("Test Transform", () => {
strokeColor: "#5f3dc4",
},
];
expect(
convertToExcalidrawElements(
elements as ExcalidrawProgrammaticAPI["elements"],
),
).toMatchSnapshot();
convertToExcalidrawElements(
elements as ExcalidrawProgrammaticAPI["elements"],
).forEach((ele) => {
expect(ele).toMatchSnapshot({
seed: expect.any(Number),
versionNonce: expect.any(Number),
id: expect.any(String),
});
});
});
it("should transform linear elements", () => {
@@ -627,10 +635,14 @@ describe("Test Transform", () => {
height: 200,
},
];
expect(
convertToExcalidrawElements(
elements as ExcalidrawProgrammaticAPI["elements"],
),
).toMatchSnapshot();
convertToExcalidrawElements(
elements as ExcalidrawProgrammaticAPI["elements"],
).forEach((ele) => {
expect(ele).toMatchSnapshot({
seed: expect.any(Number),
versionNonce: expect.any(Number),
id: expect.any(String),
});
});
});
});