chore: bump @testing-library/react 12.1.5 -> 16.0.0 (#8322)

This commit is contained in:
David Luzar
2024-08-06 15:17:42 +02:00
committed by GitHub
parent 3cf14c73a3
commit f19ce30dfe
52 changed files with 1035 additions and 978 deletions
@@ -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");