66
77import type { ExecutionResult } from 'graphql' ;
88
9- import { createPartialMockNotification } from '../__mocks__/notifications-mocks' ;
109import type { Hostname , Link } from '../types' ;
1110import type { SubjectType } from '../typesGitHub' ;
1211import * as logger from '../utils/logger' ;
@@ -20,7 +19,6 @@ import {
2019 generateGitHubWebUrl ,
2120 generateNotificationReferrerId ,
2221 getChevronDetails ,
23- getDefaultURLForType ,
2422 getPlatformFromHostname ,
2523 isEnterpriseServerHost ,
2624} from './helpers' ;
@@ -556,76 +554,6 @@ describe('renderer/utils/helpers.ts', () => {
556554 } ) ;
557555 } ) ;
558556
559- describe ( 'getDefaultURLForType' , ( ) => {
560- const mockUrl = 'https://github.com/gitify-app/notifications-test' as Link ;
561-
562- it ( 'discussions' , ( ) => {
563- const mockNotification = createPartialMockNotification (
564- { type : 'Discussion' } ,
565- { html_url : mockUrl } ,
566- ) ;
567-
568- expect ( getDefaultURLForType ( mockNotification ) ) . toEqual (
569- 'https://github.com/gitify-app/notifications-test/discussions' ,
570- ) ;
571- } ) ;
572-
573- it ( 'issues' , ( ) => {
574- const mockNotification = createPartialMockNotification (
575- { type : 'Issue' } ,
576- { html_url : mockUrl } ,
577- ) ;
578-
579- expect ( getDefaultURLForType ( mockNotification ) ) . toEqual (
580- 'https://github.com/gitify-app/notifications-test/issues' ,
581- ) ;
582- } ) ;
583-
584- it ( 'pull requests' , ( ) => {
585- const mockNotification = createPartialMockNotification (
586- { type : 'PullRequest' } ,
587- { html_url : mockUrl } ,
588- ) ;
589-
590- expect ( getDefaultURLForType ( mockNotification ) ) . toEqual (
591- 'https://github.com/gitify-app/notifications-test/pulls' ,
592- ) ;
593- } ) ;
594-
595- it ( 'repository invitation' , ( ) => {
596- const mockNotification = createPartialMockNotification (
597- { type : 'RepositoryInvitation' } ,
598- { html_url : mockUrl } ,
599- ) ;
600-
601- expect ( getDefaultURLForType ( mockNotification ) ) . toEqual (
602- 'https://github.com/gitify-app/notifications-test/invitations' ,
603- ) ;
604- } ) ;
605-
606- it ( 'repository dependabot alert thread' , ( ) => {
607- const mockNotification = createPartialMockNotification (
608- { type : 'RepositoryDependabotAlertsThread' } ,
609- { html_url : mockUrl } ,
610- ) ;
611-
612- expect ( getDefaultURLForType ( mockNotification ) ) . toEqual (
613- 'https://github.com/gitify-app/notifications-test/security/dependabot' ,
614- ) ;
615- } ) ;
616-
617- it ( 'default web urls' , ( ) => {
618- const mockNotification = createPartialMockNotification (
619- { type : 'Commit' } ,
620- { html_url : mockUrl } ,
621- ) ;
622-
623- expect ( getDefaultURLForType ( mockNotification ) ) . toEqual (
624- 'https://github.com/gitify-app/notifications-test' ,
625- ) ;
626- } ) ;
627- } ) ;
628-
629557 describe ( 'getChevronDetails' , ( ) => {
630558 it ( 'should return correct chevron details' , ( ) => {
631559 expect ( getChevronDetails ( true , true , 'account' ) ) . toEqual ( {
0 commit comments