1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-11-14 17:35:35 +01:00

Fix tests

This commit is contained in:
Aleksandr Gumroian 2024-06-07 16:39:50 +02:00
parent dfdaadeb65
commit 84097fa8e0
No known key found for this signature in database
GPG Key ID: 9E77849C64F0A733
13 changed files with 15 additions and 15 deletions

View File

@ -9,7 +9,7 @@ import React from "react";
import { render } from "customTestRender";
import { CheckBox } from "../CheckBox";
import CheckBox from "../CheckBox";
describe("<Checkbox/>", () => {
it("Render checkbox", () => {

View File

@ -9,7 +9,7 @@ import React from "react";
import { render } from "customTestRender";
import { DownloadButton } from "../DownloadButton";
import DownloadButton from "../DownloadButton";
describe("<DownloadButton />", () => {
it("should have download attribute", () => {

View File

@ -9,7 +9,7 @@ import React from "react";
import { render, fireEvent, getByLabelText, wait } from "customTestRender";
import { NumberInput } from "../NumberInput";
import NumberInput from "../NumberInput";
describe("<NumberInput/>", () => {
const onChangeMock = jest.fn();

View File

@ -9,7 +9,7 @@ import React from "react";
import { render } from "customTestRender";
import { PasswordInput } from "../PasswordInput";
import PasswordInput from "../PasswordInput";
describe("<PasswordInput/>", () => {
it("Render password input", () => {

View File

@ -9,7 +9,7 @@ import React from "react";
import { render } from "customTestRender";
import { RadioSet } from "../RadioSet";
import RadioSet from "../RadioSet";
const TEST_CHOICES = [
{

View File

@ -14,7 +14,7 @@ import {
render,
} from "customTestRender";
import { Select } from "../Select";
import Select from "../Select";
const TEST_CHOICES = {
1: "one",

View File

@ -9,7 +9,7 @@ import React from "react";
import { render } from "customTestRender";
import { Switch } from "../Switch";
import Switch from "../Switch";
describe("<Switch/>", () => {
it("Render switch", () => {

View File

@ -9,7 +9,7 @@ import React from "react";
import { render } from "customTestRender";
import { TextInput } from "../TextInput";
import TextInput from "../TextInput";
describe("<TextInput/>", () => {
it("Render text input", () => {

View File

@ -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("<ResetWiFiSettings/>", () => {
const webSockets = new WebSockets();

View File

@ -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("<WiFiSettings/>", () => {
let firstRender;

View File

@ -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("<RebootButton/>", () => {
let componentContainer;

View File

@ -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.

View File

@ -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", () => {