revert: "build: Migrate to Vite 🚀" (#6814)
Revert "build: Migrate to Vite 🚀 (#6713)"
This reverts commit e93bbc5776
.
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`restoreElements > should restore arrow element correctly 1`] = `
|
||||
{
|
||||
exports[`restoreElements should restore arrow element correctly 1`] = `
|
||||
Object {
|
||||
"angle": 0,
|
||||
"backgroundColor": "transparent",
|
||||
"boundElements": [],
|
||||
"boundElements": Array [],
|
||||
"endArrowhead": null,
|
||||
"endBinding": null,
|
||||
"fillStyle": "hachure",
|
||||
"frameId": null,
|
||||
"groupIds": [],
|
||||
"groupIds": Array [],
|
||||
"height": 100,
|
||||
"id": "id-arrow01",
|
||||
"isDeleted": false,
|
||||
@ -17,18 +17,18 @@ exports[`restoreElements > should restore arrow element correctly 1`] = `
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"opacity": 100,
|
||||
"points": [
|
||||
[
|
||||
"points": Array [
|
||||
Array [
|
||||
0,
|
||||
0,
|
||||
],
|
||||
[
|
||||
Array [
|
||||
100,
|
||||
100,
|
||||
],
|
||||
],
|
||||
"roughness": 1,
|
||||
"roundness": {
|
||||
"roundness": Object {
|
||||
"type": 2,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
@ -47,14 +47,14 @@ exports[`restoreElements > should restore arrow element correctly 1`] = `
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`restoreElements > should restore correctly with rectangle, ellipse and diamond elements 1`] = `
|
||||
{
|
||||
exports[`restoreElements should restore correctly with rectangle, ellipse and diamond elements 1`] = `
|
||||
Object {
|
||||
"angle": 0,
|
||||
"backgroundColor": "blue",
|
||||
"boundElements": [],
|
||||
"boundElements": Array [],
|
||||
"fillStyle": "cross-hatch",
|
||||
"frameId": null,
|
||||
"groupIds": [
|
||||
"groupIds": Array [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
@ -66,7 +66,7 @@ exports[`restoreElements > should restore correctly with rectangle, ellipse and
|
||||
"locked": false,
|
||||
"opacity": 10,
|
||||
"roughness": 2,
|
||||
"roundness": {
|
||||
"roundness": Object {
|
||||
"type": 3,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
@ -83,14 +83,14 @@ exports[`restoreElements > should restore correctly with rectangle, ellipse and
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`restoreElements > should restore correctly with rectangle, ellipse and diamond elements 2`] = `
|
||||
{
|
||||
exports[`restoreElements should restore correctly with rectangle, ellipse and diamond elements 2`] = `
|
||||
Object {
|
||||
"angle": 0,
|
||||
"backgroundColor": "blue",
|
||||
"boundElements": [],
|
||||
"boundElements": Array [],
|
||||
"fillStyle": "cross-hatch",
|
||||
"frameId": null,
|
||||
"groupIds": [
|
||||
"groupIds": Array [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
@ -102,7 +102,7 @@ exports[`restoreElements > should restore correctly with rectangle, ellipse and
|
||||
"locked": false,
|
||||
"opacity": 10,
|
||||
"roughness": 2,
|
||||
"roundness": {
|
||||
"roundness": Object {
|
||||
"type": 3,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
@ -119,14 +119,14 @@ exports[`restoreElements > should restore correctly with rectangle, ellipse and
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`restoreElements > should restore correctly with rectangle, ellipse and diamond elements 3`] = `
|
||||
{
|
||||
exports[`restoreElements should restore correctly with rectangle, ellipse and diamond elements 3`] = `
|
||||
Object {
|
||||
"angle": 0,
|
||||
"backgroundColor": "blue",
|
||||
"boundElements": [],
|
||||
"boundElements": Array [],
|
||||
"fillStyle": "cross-hatch",
|
||||
"frameId": null,
|
||||
"groupIds": [
|
||||
"groupIds": Array [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
@ -138,7 +138,7 @@ exports[`restoreElements > should restore correctly with rectangle, ellipse and
|
||||
"locked": false,
|
||||
"opacity": 10,
|
||||
"roughness": 2,
|
||||
"roundness": {
|
||||
"roundness": Object {
|
||||
"type": 3,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
@ -155,14 +155,14 @@ exports[`restoreElements > should restore correctly with rectangle, ellipse and
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`restoreElements > should restore freedraw element correctly 1`] = `
|
||||
{
|
||||
exports[`restoreElements should restore freedraw element correctly 1`] = `
|
||||
Object {
|
||||
"angle": 0,
|
||||
"backgroundColor": "transparent",
|
||||
"boundElements": [],
|
||||
"boundElements": Array [],
|
||||
"fillStyle": "hachure",
|
||||
"frameId": null,
|
||||
"groupIds": [],
|
||||
"groupIds": Array [],
|
||||
"height": 0,
|
||||
"id": "id-freedraw01",
|
||||
"isDeleted": false,
|
||||
@ -170,10 +170,10 @@ exports[`restoreElements > should restore freedraw element correctly 1`] = `
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"opacity": 100,
|
||||
"points": [],
|
||||
"pressures": [],
|
||||
"points": Array [],
|
||||
"pressures": Array [],
|
||||
"roughness": 1,
|
||||
"roundness": {
|
||||
"roundness": Object {
|
||||
"type": 3,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
@ -191,16 +191,16 @@ exports[`restoreElements > should restore freedraw element correctly 1`] = `
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`restoreElements > should restore line and draw elements correctly 1`] = `
|
||||
{
|
||||
exports[`restoreElements should restore line and draw elements correctly 1`] = `
|
||||
Object {
|
||||
"angle": 0,
|
||||
"backgroundColor": "transparent",
|
||||
"boundElements": [],
|
||||
"boundElements": Array [],
|
||||
"endArrowhead": null,
|
||||
"endBinding": null,
|
||||
"fillStyle": "hachure",
|
||||
"frameId": null,
|
||||
"groupIds": [],
|
||||
"groupIds": Array [],
|
||||
"height": 100,
|
||||
"id": "id-line01",
|
||||
"isDeleted": false,
|
||||
@ -208,18 +208,18 @@ exports[`restoreElements > should restore line and draw elements correctly 1`] =
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"opacity": 100,
|
||||
"points": [
|
||||
[
|
||||
"points": Array [
|
||||
Array [
|
||||
0,
|
||||
0,
|
||||
],
|
||||
[
|
||||
Array [
|
||||
100,
|
||||
100,
|
||||
],
|
||||
],
|
||||
"roughness": 1,
|
||||
"roundness": {
|
||||
"roundness": Object {
|
||||
"type": 2,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
@ -238,16 +238,16 @@ exports[`restoreElements > should restore line and draw elements correctly 1`] =
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`restoreElements > should restore line and draw elements correctly 2`] = `
|
||||
{
|
||||
exports[`restoreElements should restore line and draw elements correctly 2`] = `
|
||||
Object {
|
||||
"angle": 0,
|
||||
"backgroundColor": "transparent",
|
||||
"boundElements": [],
|
||||
"boundElements": Array [],
|
||||
"endArrowhead": null,
|
||||
"endBinding": null,
|
||||
"fillStyle": "hachure",
|
||||
"frameId": null,
|
||||
"groupIds": [],
|
||||
"groupIds": Array [],
|
||||
"height": 100,
|
||||
"id": "id-draw01",
|
||||
"isDeleted": false,
|
||||
@ -255,18 +255,18 @@ exports[`restoreElements > should restore line and draw elements correctly 2`] =
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"opacity": 100,
|
||||
"points": [
|
||||
[
|
||||
"points": Array [
|
||||
Array [
|
||||
0,
|
||||
0,
|
||||
],
|
||||
[
|
||||
Array [
|
||||
100,
|
||||
100,
|
||||
],
|
||||
],
|
||||
"roughness": 1,
|
||||
"roundness": {
|
||||
"roundness": Object {
|
||||
"type": 2,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
@ -285,18 +285,18 @@ exports[`restoreElements > should restore line and draw elements correctly 2`] =
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`restoreElements > should restore text element correctly passing value for each attribute 1`] = `
|
||||
{
|
||||
exports[`restoreElements should restore text element correctly passing value for each attribute 1`] = `
|
||||
Object {
|
||||
"angle": 0,
|
||||
"backgroundColor": "transparent",
|
||||
"baseline": 0,
|
||||
"boundElements": [],
|
||||
"boundElements": Array [],
|
||||
"containerId": null,
|
||||
"fillStyle": "hachure",
|
||||
"fontFamily": 1,
|
||||
"fontSize": 14,
|
||||
"frameId": null,
|
||||
"groupIds": [],
|
||||
"groupIds": Array [],
|
||||
"height": 100,
|
||||
"id": "id-text01",
|
||||
"isDeleted": false,
|
||||
@ -306,7 +306,7 @@ exports[`restoreElements > should restore text element correctly passing value f
|
||||
"opacity": 100,
|
||||
"originalText": "text",
|
||||
"roughness": 1,
|
||||
"roundness": {
|
||||
"roundness": Object {
|
||||
"type": 3,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
@ -326,18 +326,18 @@ exports[`restoreElements > should restore text element correctly passing value f
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`restoreElements > should restore text element correctly with unknown font family, null text and undefined alignment 1`] = `
|
||||
{
|
||||
exports[`restoreElements should restore text element correctly with unknown font family, null text and undefined alignment 1`] = `
|
||||
Object {
|
||||
"angle": 0,
|
||||
"backgroundColor": "transparent",
|
||||
"baseline": 0,
|
||||
"boundElements": [],
|
||||
"boundElements": Array [],
|
||||
"containerId": null,
|
||||
"fillStyle": "hachure",
|
||||
"fontFamily": 1,
|
||||
"fontSize": 10,
|
||||
"frameId": null,
|
||||
"groupIds": [],
|
||||
"groupIds": Array [],
|
||||
"height": 100,
|
||||
"id": "id-text01",
|
||||
"isDeleted": false,
|
||||
@ -347,7 +347,7 @@ exports[`restoreElements > should restore text element correctly with unknown fo
|
||||
"opacity": 100,
|
||||
"originalText": "test",
|
||||
"roughness": 1,
|
||||
"roundness": {
|
||||
"roundness": Object {
|
||||
"type": 3,
|
||||
},
|
||||
"seed": Any<Number>,
|
||||
|
@ -12,10 +12,9 @@ import { ImportedDataState } from "../../data/types";
|
||||
import { NormalizedZoomValue } from "../../types";
|
||||
import { DEFAULT_SIDEBAR, FONT_FAMILY, ROUNDNESS } from "../../constants";
|
||||
import { newElementWith } from "../../element/mutateElement";
|
||||
import { vi } from "vitest";
|
||||
|
||||
describe("restoreElements", () => {
|
||||
const mockSizeHelper = vi.spyOn(sizeHelpers, "isInvisiblySmallElement");
|
||||
const mockSizeHelper = jest.spyOn(sizeHelpers, "isInvisiblySmallElement");
|
||||
|
||||
beforeEach(() => {
|
||||
mockSizeHelper.mockReset();
|
||||
@ -153,7 +152,7 @@ describe("restoreElements", () => {
|
||||
it("when arrow element has undefined endArrowHead", () => {
|
||||
const arrowElement = API.createElement({ type: "arrow" });
|
||||
Object.defineProperty(arrowElement, "endArrowhead", {
|
||||
get: vi.fn(() => undefined),
|
||||
get: jest.fn(() => undefined),
|
||||
});
|
||||
|
||||
const restoredElements = restore.restoreElements([arrowElement], null);
|
||||
@ -206,7 +205,7 @@ describe("restoreElements", () => {
|
||||
[1, 1],
|
||||
];
|
||||
Object.defineProperty(lineElement_0, "points", {
|
||||
get: vi.fn(() => pointsEl_0),
|
||||
get: jest.fn(() => pointsEl_0),
|
||||
});
|
||||
|
||||
const pointsEl_1 = [
|
||||
@ -214,7 +213,7 @@ describe("restoreElements", () => {
|
||||
[5, 6],
|
||||
];
|
||||
Object.defineProperty(lineElement_1, "points", {
|
||||
get: vi.fn(() => pointsEl_1),
|
||||
get: jest.fn(() => pointsEl_1),
|
||||
});
|
||||
|
||||
const restoredElements = restore.restoreElements(
|
||||
@ -441,7 +440,7 @@ describe("restoreAppState", () => {
|
||||
const stubImportedAppState = getDefaultAppState();
|
||||
|
||||
Object.defineProperty(stubImportedAppState, "zoom", {
|
||||
get: vi.fn(() => null),
|
||||
get: jest.fn(() => null),
|
||||
});
|
||||
|
||||
const stubLocalAppState = getDefaultAppState();
|
||||
|
Reference in New Issue
Block a user