Skip to content

Commit ca33134

Browse files
authored
refactor(jest): align test suite names to match code under test (#902)
1 parent 747a4e9 commit ca33134

20 files changed

+136
-136
lines changed

src/components/AllRead.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { mockMathRandom } from './test-utils';
55

66
import { AllRead } from './AllRead';
77

8-
describe('components/all-read.tsx', function () {
8+
describe('components/AllRead.tsx', function () {
99
// The read emoji randomly rotates, but then the snapshots would never match
1010
// Have to make it consistent so the emojis are always the same
1111
mockMathRandom(0.1);

src/components/Loading.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jest.mock('nprogress', () => ({
1212
remove: jest.fn(),
1313
}));
1414

15-
describe('components/Loading.js', () => {
15+
describe('components/Loading.tsx', () => {
1616
beforeEach(() => {
1717
jest.clearAllMocks();
1818
});

src/components/Logo.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { fireEvent, render } from '@testing-library/react';
44

55
import { Logo } from './Logo';
66

7-
describe('components/ui/logo.tsx', () => {
7+
describe('components/Logo.tsx', () => {
88
it('renders correctly (light)', () => {
99
const tree = TestRenderer.create(<Logo />);
1010

src/components/NotificationRow.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { mockedSingleNotification } from '../__mocks__/mockedData';
99
import { NotificationRow } from './NotificationRow';
1010
import { mockAccounts, mockSettings } from '../__mocks__/mock-state';
1111

12-
describe('components/Notification.js', () => {
12+
describe('components/NotificationRow.tsx', () => {
1313
beforeEach(() => {
1414
jest.spyOn(helpers, 'openInBrowser');
1515
});

src/components/Oops.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { mockMathRandom } from './test-utils';
55

66
import { Oops } from './Oops';
77

8-
describe('components/oops.tsx', function () {
8+
describe('components/Oops.tsx', function () {
99
// The error emoji randomly rotates, but then the snapshots would never match
1010
// Have to make it consistent so the emojis are always the same
1111
mockMathRandom(0.1);

src/components/__snapshots__/AllRead.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`components/all-read.tsx should render itself & its children 1`] = `
3+
exports[`components/AllRead.tsx should render itself & its children 1`] = `
44
<div
55
className="flex flex-1 flex-col justify-center items-center p-4 bg-white dark:bg-gray-dark text-black dark:text-white"
66
>

src/components/__snapshots__/Logo.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`components/ui/logo.tsx renders correctly (light) 1`] = `
3+
exports[`components/Logo.tsx renders correctly (light) 1`] = `
44
<svg
55
className=""
66
onClick={[Function]}
@@ -47,7 +47,7 @@ exports[`components/ui/logo.tsx renders correctly (light) 1`] = `
4747
</svg>
4848
`;
4949

50-
exports[`components/ui/logo.tsx renders correctly(dark) 1`] = `
50+
exports[`components/Logo.tsx renders correctly(dark) 1`] = `
5151
<svg
5252
className=""
5353
onClick={[Function]}

src/components/__snapshots__/NotificationRow.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`components/Notification.js should render itself & its children 1`] = `
3+
exports[`components/NotificationRow.tsx should render itself & its children 1`] = `
44
<div
55
className="flex space-x-3 py-2 px-3 bg-white dark:bg-gray-dark dark:text-white hover:bg-gray-100 dark:hover:bg-gray-darker border-b border-gray-100 dark:border-gray-darker group"
66
>

src/components/__snapshots__/Oops.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`components/oops.tsx should render itself & its children 1`] = `
3+
exports[`components/Oops.tsx should render itself & its children 1`] = `
44
<div
55
className="flex flex-1 flex-col justify-center items-center p-4 bg-white dark:bg-gray-dark text-black dark:text-white"
66
>

src/routes/LoginEnterprise.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jest.mock('react-router-dom', () => ({
1616
useNavigate: () => mockNavigate,
1717
}));
1818

19-
describe('routes/LoginEnterprise.js', () => {
19+
describe('routes/LoginEnterprise.tsx', () => {
2020
const mockAccounts: AuthState = {
2121
enterpriseAccounts: [],
2222
user: null,

0 commit comments

Comments
 (0)