Fix history initialization (#2115)

This commit is contained in:
David Luzar 2020-09-09 21:08:06 +02:00 committed by GitHub
parent 9cac7816cc
commit aaddde5dd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 1052 additions and 48 deletions

View file

@ -1,9 +1,6 @@
import {
newTextElement,
duplicateElement,
newLinearElement,
} from "./newElement";
import { duplicateElement } from "./newElement";
import { mutateElement } from "./mutateElement";
import { API } from "../tests/helpers/api";
const isPrimitive = (val: any) => {
const type = typeof val;
@ -22,7 +19,7 @@ const assertCloneObjects = (source: any, clone: any) => {
};
it("clones arrow element", () => {
const element = newLinearElement({
const element = API.createElement({
type: "arrow",
x: 0,
y: 0,
@ -68,7 +65,8 @@ it("clones arrow element", () => {
});
it("clones text element", () => {
const element = newTextElement({
const element = API.createElement({
type: "text",
x: 0,
y: 0,
strokeColor: "#000000",