From 4ca07dceb090cb39d76604590f1b9009674ffeaa Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Fri, 7 Jun 2024 16:39:50 +0200 Subject: [PATCH] Fix tests --- src/bootstrap/__tests__/CheckBox.test.js | 2 +- src/bootstrap/__tests__/DownloadButton.test.js | 2 +- src/bootstrap/__tests__/NumberInput.test.js | 2 +- src/bootstrap/__tests__/PasswordInput.test.js | 2 +- src/bootstrap/__tests__/RadioSet.test.js | 2 +- src/bootstrap/__tests__/Select.test.js | 2 +- src/bootstrap/__tests__/Switch.test.js | 2 +- src/bootstrap/__tests__/TextInput.test.js | 2 +- src/common/WiFiSettings/__tests__/ResetWiFiSettings.test.js | 4 ++-- src/common/WiFiSettings/__tests__/WiFiSettings.test.js | 4 ++-- src/common/__tests__/RebootButton.test.js | 2 +- src/form/__tests__/hooks.test.js | 2 +- src/utils/__tests__/datetime.test.js | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/bootstrap/__tests__/CheckBox.test.js b/src/bootstrap/__tests__/CheckBox.test.js index 4776404..58f1135 100644 --- a/src/bootstrap/__tests__/CheckBox.test.js +++ b/src/bootstrap/__tests__/CheckBox.test.js @@ -9,7 +9,7 @@ import React from "react"; import { render } from "customTestRender"; -import { CheckBox } from "../CheckBox"; +import CheckBox from "../CheckBox"; describe("", () => { it("Render checkbox", () => { diff --git a/src/bootstrap/__tests__/DownloadButton.test.js b/src/bootstrap/__tests__/DownloadButton.test.js index 6d82743..c301fca 100644 --- a/src/bootstrap/__tests__/DownloadButton.test.js +++ b/src/bootstrap/__tests__/DownloadButton.test.js @@ -9,7 +9,7 @@ import React from "react"; import { render } from "customTestRender"; -import { DownloadButton } from "../DownloadButton"; +import DownloadButton from "../DownloadButton"; describe("", () => { it("should have download attribute", () => { diff --git a/src/bootstrap/__tests__/NumberInput.test.js b/src/bootstrap/__tests__/NumberInput.test.js index 1a83f00..6df7200 100644 --- a/src/bootstrap/__tests__/NumberInput.test.js +++ b/src/bootstrap/__tests__/NumberInput.test.js @@ -9,7 +9,7 @@ import React from "react"; import { render, fireEvent, getByLabelText, wait } from "customTestRender"; -import { NumberInput } from "../NumberInput"; +import NumberInput from "../NumberInput"; describe("", () => { const onChangeMock = jest.fn(); diff --git a/src/bootstrap/__tests__/PasswordInput.test.js b/src/bootstrap/__tests__/PasswordInput.test.js index 370d25d..2a08f41 100644 --- a/src/bootstrap/__tests__/PasswordInput.test.js +++ b/src/bootstrap/__tests__/PasswordInput.test.js @@ -9,7 +9,7 @@ import React from "react"; import { render } from "customTestRender"; -import { PasswordInput } from "../PasswordInput"; +import PasswordInput from "../PasswordInput"; describe("", () => { it("Render password input", () => { diff --git a/src/bootstrap/__tests__/RadioSet.test.js b/src/bootstrap/__tests__/RadioSet.test.js index bcd6726..0897e1c 100644 --- a/src/bootstrap/__tests__/RadioSet.test.js +++ b/src/bootstrap/__tests__/RadioSet.test.js @@ -9,7 +9,7 @@ import React from "react"; import { render } from "customTestRender"; -import { RadioSet } from "../RadioSet"; +import RadioSet from "../RadioSet"; const TEST_CHOICES = [ { diff --git a/src/bootstrap/__tests__/Select.test.js b/src/bootstrap/__tests__/Select.test.js index f145e48..9795e8a 100644 --- a/src/bootstrap/__tests__/Select.test.js +++ b/src/bootstrap/__tests__/Select.test.js @@ -14,7 +14,7 @@ import { render, } from "customTestRender"; -import { Select } from "../Select"; +import Select from "../Select"; const TEST_CHOICES = { 1: "one", diff --git a/src/bootstrap/__tests__/Switch.test.js b/src/bootstrap/__tests__/Switch.test.js index b0f73ef..9d0010a 100644 --- a/src/bootstrap/__tests__/Switch.test.js +++ b/src/bootstrap/__tests__/Switch.test.js @@ -9,7 +9,7 @@ import React from "react"; import { render } from "customTestRender"; -import { Switch } from "../Switch"; +import Switch from "../Switch"; describe("", () => { it("Render switch", () => { diff --git a/src/bootstrap/__tests__/TextInput.test.js b/src/bootstrap/__tests__/TextInput.test.js index 0bb4f3c..d3bb29e 100644 --- a/src/bootstrap/__tests__/TextInput.test.js +++ b/src/bootstrap/__tests__/TextInput.test.js @@ -9,7 +9,7 @@ import React from "react"; import { render } from "customTestRender"; -import { TextInput } from "../TextInput"; +import TextInput from "../TextInput"; describe("", () => { it("Render text input", () => { diff --git a/src/common/WiFiSettings/__tests__/ResetWiFiSettings.test.js b/src/common/WiFiSettings/__tests__/ResetWiFiSettings.test.js index a5000b6..5b388b6 100644 --- a/src/common/WiFiSettings/__tests__/ResetWiFiSettings.test.js +++ b/src/common/WiFiSettings/__tests__/ResetWiFiSettings.test.js @@ -9,12 +9,12 @@ import React from "react"; import { render, fireEvent, wait } from "customTestRender"; import mockAxios from "jest-mock-axios"; -import { WebSockets } from "webSockets/WebSockets"; +import WebSockets from "webSockets/WebSockets"; import { mockJSONError } from "testUtils/network"; import { mockSetAlert } from "testUtils/alertContextMock"; import { ALERT_TYPES } from "../../../bootstrap/Alert"; -import { ResetWiFiSettings } from "../ResetWiFiSettings"; +import ResetWiFiSettings from "../ResetWiFiSettings"; describe("", () => { const webSockets = new WebSockets(); diff --git a/src/common/WiFiSettings/__tests__/WiFiSettings.test.js b/src/common/WiFiSettings/__tests__/WiFiSettings.test.js index a0cafbd..f06c152 100644 --- a/src/common/WiFiSettings/__tests__/WiFiSettings.test.js +++ b/src/common/WiFiSettings/__tests__/WiFiSettings.test.js @@ -10,7 +10,7 @@ import diffSnapshot from "snapshot-diff"; import mockAxios from "jest-mock-axios"; import { fireEvent, render, wait } from "customTestRender"; -import { WebSockets } from "webSockets/WebSockets"; +import WebSockets from "webSockets/WebSockets"; import { mockJSONError } from "testUtils/network"; import { @@ -19,7 +19,7 @@ import { twoDevices, threeDevices, } from "./__fixtures__/wifiSettings"; -import { WiFiSettings, validator, byteCount } from "../WiFiSettings"; +import WiFiSettings, { validator, byteCount } from "../WiFiSettings"; describe("", () => { let firstRender; diff --git a/src/common/__tests__/RebootButton.test.js b/src/common/__tests__/RebootButton.test.js index c86302a..74c5b8e 100644 --- a/src/common/__tests__/RebootButton.test.js +++ b/src/common/__tests__/RebootButton.test.js @@ -18,7 +18,7 @@ import mockAxios from "jest-mock-axios"; import { mockJSONError } from "testUtils/network"; import { mockSetAlert } from "testUtils/alertContextMock"; -import { RebootButton } from "../RebootButton"; +import RebootButton from "../RebootButton"; describe("", () => { let componentContainer; diff --git a/src/form/__tests__/hooks.test.js b/src/form/__tests__/hooks.test.js index 96dfb4c..e57e466 100644 --- a/src/form/__tests__/hooks.test.js +++ b/src/form/__tests__/hooks.test.js @@ -9,7 +9,7 @@ import React from "react"; import { act, fireEvent, render, waitForElement } from "customTestRender"; import mockAxios from "jest-mock-axios"; -import { WebSockets } from "webSockets/WebSockets"; +import WebSockets from "webSockets/WebSockets"; import ForisForm from "../components/ForisForm"; // It's possible to unittest each hooks via react-hooks-testing-library. diff --git a/src/utils/__tests__/datetime.test.js b/src/utils/__tests__/datetime.test.js index 3d4b760..54cf818 100644 --- a/src/utils/__tests__/datetime.test.js +++ b/src/utils/__tests__/datetime.test.js @@ -5,7 +5,7 @@ * See /LICENSE for more information. */ -import { toLocaleDateString } from "../datetime"; +import toLocaleDateString from "../datetime"; describe("toLocaleDateString", () => { it("should work with different locale", () => {