aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/pages/LandingPage.test.tsx
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2021-01-03 05:47:07 +0300
committerGravatar Hassan Abouelela <[email protected]>2021-01-03 05:47:07 +0300
commitd664ddc9b84b25922239e3bbc253b35ea54f2533 (patch)
treef1892f7e9b0880826b28a503aea312a97b0ea3a2 /src/tests/pages/LandingPage.test.tsx
parentAdds 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.tsx14
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();
});