diff options
author | 2021-01-03 05:47:07 +0300 | |
---|---|---|
committer | 2021-01-03 05:47:07 +0300 | |
commit | d664ddc9b84b25922239e3bbc253b35ea54f2533 (patch) | |
tree | f1892f7e9b0880826b28a503aea312a97b0ea3a2 /src/tests/pages/LandingPage.test.tsx | |
parent | Adds EsLint (diff) |
Fixes Preexisting Linting Issues
Fixes all errors, and most warnings generated by eslint. Most were fixed
by eslint automatically such as indentation and quotes.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'src/tests/pages/LandingPage.test.tsx')
-rw-r--r-- | src/tests/pages/LandingPage.test.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tests/pages/LandingPage.test.tsx b/src/tests/pages/LandingPage.test.tsx index 23195bd..5635e63 100644 --- a/src/tests/pages/LandingPage.test.tsx +++ b/src/tests/pages/LandingPage.test.tsx @@ -1,11 +1,11 @@ -import React from 'react'; -import { render } from '@testing-library/react'; +import React from "react"; +import { render } from "@testing-library/react"; import LandingPage from "../../pages/LandingPage"; import * as forms from "../../api/forms"; import { BrowserRouter as Router } from "react-router-dom"; -import { QuestionType } from '../../api/question'; +import { QuestionType } from "../../api/question"; const testingForm: forms.Form = { "id": "testing-form", @@ -20,15 +20,15 @@ const testingForm: forms.Form = { "data": {} } ] -} +}; -test('renders landing page', () => { +test("renders landing page", () => { const setForms = jest.fn(() => [testingForm]); Object.defineProperty(forms, "getForms", setForms); const handleForms = jest.spyOn(React, "useState"); - handleForms.mockImplementation(_value => [[testingForm], setForms]); + handleForms.mockImplementation(() => [[testingForm], setForms]); const { getByText } = render(<Router><LandingPage /></Router>); // If we rendered the headerbar we rendered the landing page. - let headerBar = getByText(/Python Discord Forms/); + const headerBar = getByText(/Python Discord Forms/); expect(headerBar).toBeInTheDocument(); }); |