From d664ddc9b84b25922239e3bbc253b35ea54f2533 Mon Sep 17 00:00:00 2001
From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Date: Sun, 3 Jan 2021 05:47:07 +0300
Subject: 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 <47495861+HassanAbouelela@users.noreply.github.com>
---
src/tests/pages/CallbackPage.test.tsx | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
(limited to 'src/tests/pages/CallbackPage.test.tsx')
diff --git a/src/tests/pages/CallbackPage.test.tsx b/src/tests/pages/CallbackPage.test.tsx
index e878577..9049ca3 100644
--- a/src/tests/pages/CallbackPage.test.tsx
+++ b/src/tests/pages/CallbackPage.test.tsx
@@ -1,23 +1,23 @@
-import React from 'react';
-import { render } from '@testing-library/react';
+import React from "react";
+import { render } from "@testing-library/react";
-import CallbackPage from '../../pages/CallbackPage';
+import CallbackPage from "../../pages/CallbackPage";
-test('callback page renders provided code', () => {
+test("callback page renders provided code", () => {
global.opener = {
postMessage: jest.fn()
- }
+ };
- let mockLocation = new URL("https://forms.pythondiscord.com/authorize?code=abcdef");
+ const mockLocation = new URL("https://forms.pythondiscord.com/authorize?code=abcdef");
- Object.defineProperty(global, "location", {value: mockLocation})
+ Object.defineProperty(global, "location", {value: mockLocation});
- let comp = ;
+ const comp = ;
const { getByText } = render(comp);
- let codeText = getByText(/Code is abcdef/);
+ const codeText = getByText(/Code is abcdef/);
expect(codeText).toBeInTheDocument();
- expect(global.opener.postMessage).toBeCalledTimes(1)
+ expect(global.opener.postMessage).toBeCalledTimes(1);
});
--
cgit v1.2.3