From 83f4da35d814bf6949aa05b5b12bc4bd082f2ad5 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Tue, 18 Jun 2024 10:51:25 -0400 Subject: [PATCH] refactor: rename repository component (#1267) --- src/components/AccountNotifications.test.tsx | 4 ++-- src/components/AccountNotifications.tsx | 2 +- ...pository.test.tsx => RepositoryNotifications.test.tsx} | 2 +- .../{Repository.tsx => RepositoryNotifications.tsx} | 0 .../__snapshots__/AccountNotifications.test.tsx.snap | 8 ++++---- ...est.tsx.snap => RepositoryNotifications.test.tsx.snap} | 0 6 files changed, 8 insertions(+), 8 deletions(-) rename src/components/{Repository.test.tsx => RepositoryNotifications.test.tsx} (97%) rename src/components/{Repository.tsx => RepositoryNotifications.tsx} (100%) rename src/components/__snapshots__/{Repository.test.tsx.snap => RepositoryNotifications.test.tsx.snap} (100%) diff --git a/src/components/AccountNotifications.test.tsx b/src/components/AccountNotifications.test.tsx index c8806b2c..ff5e5bbe 100644 --- a/src/components/AccountNotifications.test.tsx +++ b/src/components/AccountNotifications.test.tsx @@ -4,8 +4,8 @@ import { mockGitHubNotifications } from '../utils/api/__mocks__/response-mocks'; import * as links from '../utils/links'; import { AccountNotifications } from './AccountNotifications'; -jest.mock('./Repository', () => ({ - RepositoryNotifications: () =>
Repository
, +jest.mock('./RepositoryNotifications', () => ({ + RepositoryNotifications: () =>
Repository Notifications
, })); describe('components/AccountNotifications.tsx', () => { diff --git a/src/components/AccountNotifications.tsx b/src/components/AccountNotifications.tsx index 8f90b740..57dba6da 100644 --- a/src/components/AccountNotifications.tsx +++ b/src/components/AccountNotifications.tsx @@ -7,7 +7,7 @@ import { type FC, useState } from 'react'; import type { Account } from '../types'; import type { Notification } from '../typesGitHub'; import { openAccountProfile } from '../utils/links'; -import { RepositoryNotifications } from './Repository'; +import { RepositoryNotifications } from './RepositoryNotifications'; import { PlatformIcon } from './icons/PlatformIcon'; interface IAccountNotifications { diff --git a/src/components/Repository.test.tsx b/src/components/RepositoryNotifications.test.tsx similarity index 97% rename from src/components/Repository.test.tsx rename to src/components/RepositoryNotifications.test.tsx index b8b9f3ff..7f1024d9 100644 --- a/src/components/Repository.test.tsx +++ b/src/components/RepositoryNotifications.test.tsx @@ -7,7 +7,7 @@ import { mockSingleNotification, } from '../utils/api/__mocks__/response-mocks'; import * as comms from '../utils/comms'; -import { RepositoryNotifications } from './Repository'; +import { RepositoryNotifications } from './RepositoryNotifications'; jest.mock('./NotificationRow', () => ({ NotificationRow: () =>
NotificationRow
, diff --git a/src/components/Repository.tsx b/src/components/RepositoryNotifications.tsx similarity index 100% rename from src/components/Repository.tsx rename to src/components/RepositoryNotifications.tsx diff --git a/src/components/__snapshots__/AccountNotifications.test.tsx.snap b/src/components/__snapshots__/AccountNotifications.test.tsx.snap index 4ddee861..21644ba4 100644 --- a/src/components/__snapshots__/AccountNotifications.test.tsx.snap +++ b/src/components/__snapshots__/AccountNotifications.test.tsx.snap @@ -65,7 +65,7 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
- Repository + Repository Notifications
, @@ -130,7 +130,7 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
- Repository + Repository Notifications
, "debug": [Function], @@ -494,7 +494,7 @@ exports[`components/AccountNotifications.tsx should toggle account notifications
- Repository + Repository Notifications
, @@ -559,7 +559,7 @@ exports[`components/AccountNotifications.tsx should toggle account notifications
- Repository + Repository Notifications
, "debug": [Function], diff --git a/src/components/__snapshots__/Repository.test.tsx.snap b/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap similarity index 100% rename from src/components/__snapshots__/Repository.test.tsx.snap rename to src/components/__snapshots__/RepositoryNotifications.test.tsx.snap