Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/utils/__snapshots__/github-api.test.ts.snap
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,12 +14,7 @@ exports[`./utils/github-api.ts should format the notification color 6`] = `"text

exports[`./utils/github-api.ts should format the notification color 7`] = `"text-green-500"`;

exports[`./utils/github-api.ts should format the notification color 8`] = `
{
"description": "The reason for this notification is not supported by the app.",
"type": "Unknown",
}
`;
exports[`./utils/github-api.ts should format the notification color 8`] = `"text-gray-300"`;

exports[`./utils/github-api.ts should format the notification reason 1`] = `
{
Expand Down
6 changes: 4 additions & 2 deletions src/utils/github-api.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@ import{
getNotificationTypeIcon,
getNotificationTypeIconColor,
} from './github-api'
import{Reason, SubjectType } from '../typesGithub'
import{Reason, StateType, SubjectType } from '../typesGithub'

describe('./utils/github-api.ts', () =>{
it('should format the notification reason', () =>{
Expand DownExpand Up@@ -75,6 +75,8 @@ describe('./utils/github-api.ts', () =>{
expect(getNotificationTypeIconColor('not_planned')).toMatchSnapshot();
expect(getNotificationTypeIconColor('open')).toMatchSnapshot();
expect(getNotificationTypeIconColor('reopened')).toMatchSnapshot();
expect(formatReason('something_else_unknown' as Reason)).toMatchSnapshot();
expect(
getNotificationTypeIconColor('something_else_unknown' as StateType),
).toMatchSnapshot();
});
});