import * as React from "react"; import * as ReactDOM from "react-dom"; import DraggableExample from "./DraggableExample"; import { wait, mousedown, mouseup, mousemove } from "../TestHelper"; import * as sinon from "sinon"; describe("test Moveable(triggerRender)", () => { beforeEach(() => { document.documentElement.style.cssText = "position: relative;height: 100%; width: 100%;margin: 0; padding: 0;"; document.body.style.cssText = "position: relative;height: 100%; width: 100%;margin: 0;padding: 0;"; document.body.innerHTML = `
`; }); afterEach(() => { const container = document.querySelector(".container"); if (container) { ReactDOM.unmountComponentAtNode(container); } }); it("test render events", async () => { let moveable!: DraggableExample; // Given const onDragStart = sinon.spy(); const onDrag = sinon.spy(); const onDragEnd = sinon.spy(); const onRenderStart = sinon.spy(); const onRender = sinon.spy(); const onRenderEnd = sinon.spy(); ReactDOM.render(