diff --git a/packages/perseus-editor/src/widgets/__tests__/interactive-graph-editor.test.tsx b/packages/perseus-editor/src/widgets/__tests__/interactive-graph-editor.test.tsx index 8de1b9fc3f..dba66beab9 100644 --- a/packages/perseus-editor/src/widgets/__tests__/interactive-graph-editor.test.tsx +++ b/packages/perseus-editor/src/widgets/__tests__/interactive-graph-editor.test.tsx @@ -574,10 +574,7 @@ describe("InteractiveGraphEditor", () => { test("getSaveWarnings returns an error when the graph is invalid", async () => { // Arrange - jest.spyOn(React, "useRef").mockReturnValue({ - current: null, - }); - const ref = React.useRef(null); + const ref = React.createRef(); // Act render( @@ -611,10 +608,7 @@ describe("InteractiveGraphEditor", () => { test("getSaveWarnings is empty if there are no errors", async () => { // Arrange - jest.spyOn(React, "useRef").mockReturnValue({ - current: null, - }); - const ref = React.useRef(null); + const ref = React.createRef(); // Act render(