From 2213de5b20cf3e99baac1cf10fbef98730ff3e8f Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Thu, 6 Jan 2022 12:18:40 +0300 Subject: [PATCH] Fixing tests Signed-off-by: Alex Andreev --- .../components/+preferences/__tests__/preferences.test.tsx | 5 +++-- src/renderer/components/+preferences/preferences.tsx | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/+preferences/__tests__/preferences.test.tsx b/src/renderer/components/+preferences/__tests__/preferences.test.tsx index 9503b3216a..c4fc53d73f 100644 --- a/src/renderer/components/+preferences/__tests__/preferences.test.tsx +++ b/src/renderer/components/+preferences/__tests__/preferences.test.tsx @@ -28,6 +28,7 @@ import { getDiForUnitTesting } from "../../getDiForUnitTesting"; import { AppPreferenceRegistry } from "../../../../extensions/registries"; import { computed } from "mobx"; import { MemoryRouter } from "react-router-dom"; +import "@testing-library/jest-dom/extend-expect"; describe("Preferences", () => { let di: ConfigurableDependencyInjectionContainer; @@ -55,8 +56,8 @@ describe("Preferences", () => { return computed(() => [] as any); }); - const { getByTestId } = render(); + const { queryByTestId } = render(); - expect(getByTestId("custom-settings")).not.toBeInTheDocument(); + expect(queryByTestId("custom-settings")).not.toBeInTheDocument(); }); }); diff --git a/src/renderer/components/+preferences/preferences.tsx b/src/renderer/components/+preferences/preferences.tsx index 1d5a8843a2..f2fb5b34a1 100644 --- a/src/renderer/components/+preferences/preferences.tsx +++ b/src/renderer/components/+preferences/preferences.tsx @@ -80,7 +80,6 @@ class Preferences extends React.Component { return ( { - console.log("URL ", url) navigateWithoutHistoryChange({ pathname: url }); }}>
Preferences