chore: bump @testing-library/react 12.1.5 -> 16.0.0 (#8322)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { act, render, waitFor } from "./test-utils";
|
||||
import React from "react";
|
||||
import { render, waitFor } from "./test-utils";
|
||||
import { Excalidraw } from "../index";
|
||||
import { expect } from "vitest";
|
||||
import { getTextEditor, updateTextEditor } from "./queries/dom";
|
||||
@@ -103,19 +104,9 @@ describe("Test <MermaidToExcalidraw/>", () => {
|
||||
|
||||
expect(dialog.querySelector('[data-testid="mermaid-error"]')).toBeNull();
|
||||
|
||||
expect(editor.textContent).toMatchInlineSnapshot(`
|
||||
"flowchart TD
|
||||
A[Christmas] -->|Get money| B(Go shopping)
|
||||
B --> C{Let me think}
|
||||
C -->|One| D[Laptop]
|
||||
C -->|Two| E[iPhone]
|
||||
C -->|Three| F[Car]"
|
||||
`);
|
||||
expect(editor.textContent).toMatchSnapshot();
|
||||
|
||||
await act(async () => {
|
||||
updateTextEditor(editor, "flowchart TD1");
|
||||
await new Promise((cb) => setTimeout(cb, 0));
|
||||
});
|
||||
updateTextEditor(editor, "flowchart TD1");
|
||||
editor = await getTextEditor(selector, false);
|
||||
|
||||
expect(editor.textContent).toBe("flowchart TD1");
|
||||
|
||||
Reference in New Issue
Block a user