Skip to content

Commit 4c7d34d

Browse files
refactor: use strict comparison operator
1 parent f734385 commit 4c7d34d

File tree

4 files changed

+4
-22
lines changed

4 files changed

+4
-22
lines changed

__mocks__/colors.tsx

Lines changed: 0 additions & 17 deletions
This file was deleted.

__tests__/components/popus/EmailForm.test.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import "@testing-library/jest-dom"
2-
import { renderWithRedux } from "../../../__mocks__/renderWithRedux"
32
import EmailForm from "@/components/popups/profile-settings/EmailForm";
43
import { act, fireEvent, screen } from "@testing-library/react";
4+
import { renderWithRedux } from "@__mocks__/renderWithRedux";
55

66
jest.mock("next/router", () => ({
77
useRouter: () => ({
@@ -85,5 +85,4 @@ describe("EmailEditForm", () => {
8585
fireEvent.click(screen.getByTestId('close-button'))
8686
expect(handleClose).toHaveBeenCalled()
8787
})
88-
89-
})
88+
})

__tests__/components/popus/NamesForm.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ describe("NamesForm", () => {
3838
fireEvent.click(screen.getByTestId('close-button'))
3939
expect(handleClose).toHaveBeenCalled()
4040
})
41-
})
41+
})

src/components/popups/profile-settings/EmailForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default function EditEmail({ show, onClose }: EditProfileProps): ReactEle
110110
message: "This must be a valid email address",
111111
},
112112
validate: (val: string) => {
113-
if (watch('email') != val) return "Emails should match."
113+
if (watch('email') !== val) return "Emails should match."
114114
},
115115
})}
116116
/>

0 commit comments

Comments
 (0)