File tree 2 files changed +16
-8
lines changed
2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -60,12 +60,8 @@ menubarApp.on('ready', () => {
60
60
}
61
61
} ) ;
62
62
63
- ipcMain . handle ( 'get-platform' , async ( ) => {
64
- return process . platform ;
65
- } ) ;
66
- ipcMain . handle ( 'get-app-version' , async ( ) => {
67
- return app . getVersion ( ) ;
68
- } ) ;
63
+ ipcMain . handle ( 'get-platform' , ( ) => process . platform ) ;
64
+ ipcMain . handle ( 'get-app-version' , ( ) => app . getVersion ( ) ) ;
69
65
70
66
ipcMain . on ( 'reopen-window' , ( ) => menubarApp . showWindow ( ) ) ;
71
67
ipcMain . on ( 'hide-window' , ( ) => menubarApp . hideWindow ( ) ) ;
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ describe('utils/helpers.ts', () => {
27
27
} ) ;
28
28
describe ( 'isEnterpriseHost' , ( ) => {
29
29
it ( 'should return true for enterprise host' , ( ) => {
30
- expect ( isEnterpriseHost ( 'github.manos.im ' ) ) . toBe ( true ) ;
31
- expect ( isEnterpriseHost ( 'api.github.manos.im ' ) ) . toBe ( true ) ;
30
+ expect ( isEnterpriseHost ( 'github.gitify.app ' ) ) . toBe ( true ) ;
31
+ expect ( isEnterpriseHost ( 'api.github.gitify.app ' ) ) . toBe ( true ) ;
32
32
} ) ;
33
33
34
34
it ( 'should return false for non-enterprise host' , ( ) => {
@@ -49,6 +49,18 @@ describe('utils/helpers.ts', () => {
49
49
} ) ;
50
50
} ) ;
51
51
52
+ describe ( 'generateGitHubAPIUrl' , ( ) => {
53
+ it ( 'should generate a GitHub API url - non enterprise' , ( ) => {
54
+ const result = getGitHubAPIBaseUrl ( 'github.com' ) ;
55
+ expect ( result ) . toBe ( 'https://api.github.com' ) ;
56
+ } ) ;
57
+
58
+ it ( 'should generate a GitHub API url - enterprise' , ( ) => {
59
+ const result = getGitHubAPIBaseUrl ( 'github.gitify.app' ) ;
60
+ expect ( result ) . toBe ( 'https://github.gitify.app/api/v3' ) ;
61
+ } ) ;
62
+ } ) ;
63
+
52
64
describe ( 'generateGitHubWebUrl' , ( ) => {
53
65
const mockedHtmlUrl =
54
66
'https://github.com/gitify-app/notifications-test/issues/785' ;
You can’t perform that action at this time.
0 commit comments