1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-12-25 00:11:36 +01:00

Fix tests

This commit is contained in:
Aleksandr Gumroian 2024-06-07 16:39:50 +02:00
parent 912f8facdb
commit 4ca07dceb0
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 { render } from "customTestRender";
import { CheckBox } from "../CheckBox"; import CheckBox from "../CheckBox";
describe("<Checkbox/>", () => { describe("<Checkbox/>", () => {
it("Render checkbox", () => { it("Render checkbox", () => {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,12 +9,12 @@ import React from "react";
import { render, fireEvent, wait } from "customTestRender"; import { render, fireEvent, wait } from "customTestRender";
import mockAxios from "jest-mock-axios"; import mockAxios from "jest-mock-axios";
import { WebSockets } from "webSockets/WebSockets"; import WebSockets from "webSockets/WebSockets";
import { mockJSONError } from "testUtils/network"; import { mockJSONError } from "testUtils/network";
import { mockSetAlert } from "testUtils/alertContextMock"; import { mockSetAlert } from "testUtils/alertContextMock";
import { ALERT_TYPES } from "../../../bootstrap/Alert"; import { ALERT_TYPES } from "../../../bootstrap/Alert";
import { ResetWiFiSettings } from "../ResetWiFiSettings"; import ResetWiFiSettings from "../ResetWiFiSettings";
describe("<ResetWiFiSettings/>", () => { describe("<ResetWiFiSettings/>", () => {
const webSockets = new WebSockets(); const webSockets = new WebSockets();

View File

@ -10,7 +10,7 @@ import diffSnapshot from "snapshot-diff";
import mockAxios from "jest-mock-axios"; import mockAxios from "jest-mock-axios";
import { fireEvent, render, wait } from "customTestRender"; import { fireEvent, render, wait } from "customTestRender";
import { WebSockets } from "webSockets/WebSockets"; import WebSockets from "webSockets/WebSockets";
import { mockJSONError } from "testUtils/network"; import { mockJSONError } from "testUtils/network";
import { import {
@ -19,7 +19,7 @@ import {
twoDevices, twoDevices,
threeDevices, threeDevices,
} from "./__fixtures__/wifiSettings"; } from "./__fixtures__/wifiSettings";
import { WiFiSettings, validator, byteCount } from "../WiFiSettings"; import WiFiSettings, { validator, byteCount } from "../WiFiSettings";
describe("<WiFiSettings/>", () => { describe("<WiFiSettings/>", () => {
let firstRender; let firstRender;

View File

@ -18,7 +18,7 @@ import mockAxios from "jest-mock-axios";
import { mockJSONError } from "testUtils/network"; import { mockJSONError } from "testUtils/network";
import { mockSetAlert } from "testUtils/alertContextMock"; import { mockSetAlert } from "testUtils/alertContextMock";
import { RebootButton } from "../RebootButton"; import RebootButton from "../RebootButton";
describe("<RebootButton/>", () => { describe("<RebootButton/>", () => {
let componentContainer; let componentContainer;

View File

@ -9,7 +9,7 @@ import React from "react";
import { act, fireEvent, render, waitForElement } from "customTestRender"; import { act, fireEvent, render, waitForElement } from "customTestRender";
import mockAxios from "jest-mock-axios"; import mockAxios from "jest-mock-axios";
import { WebSockets } from "webSockets/WebSockets"; import WebSockets from "webSockets/WebSockets";
import ForisForm from "../components/ForisForm"; import ForisForm from "../components/ForisForm";
// It's possible to unittest each hooks via react-hooks-testing-library. // It's possible to unittest each hooks via react-hooks-testing-library.

View File

@ -5,7 +5,7 @@
* See /LICENSE for more information. * See /LICENSE for more information.
*/ */
import { toLocaleDateString } from "../datetime"; import toLocaleDateString from "../datetime";
describe("toLocaleDateString", () => { describe("toLocaleDateString", () => {
it("should work with different locale", () => { it("should work with different locale", () => {