@@ -34,7 +34,7 @@ describe("ElectronPlatform", () => {
34
34
initialise : jest . fn ( ) . mockResolvedValue ( {
35
35
protocol : "io.element.desktop" ,
36
36
sessionId : "session-id" ,
37
- config : { } ,
37
+ config : { _config : true } ,
38
38
} ) ,
39
39
} ;
40
40
@@ -69,6 +69,17 @@ describe("ElectronPlatform", () => {
69
69
expect ( rageshake . flush ) . toHaveBeenCalled ( ) ;
70
70
} ) ;
71
71
72
+ it ( "should load config" , async ( ) => {
73
+ const platform = new ElectronPlatform ( ) ;
74
+ await expect ( platform . getConfig ( ) ) . resolves . toEqual ( { _config : true } ) ;
75
+ } ) ;
76
+
77
+ it ( "should return oidc client state as expected" , async ( ) => {
78
+ const platform = new ElectronPlatform ( ) ;
79
+ await platform . getConfig ( ) ;
80
+ expect ( platform . getOidcClientState ( ) ) . toMatchInlineSnapshot ( `":element-desktop-ssoid:session-id"` ) ;
81
+ } ) ;
82
+
72
83
it ( "dispatches view settings action on preferences event" , ( ) => {
73
84
new ElectronPlatform ( ) ;
74
85
const [ event , handler ] = getElectronEventHandlerCall ( "preferences" ) ! ;
@@ -292,7 +303,7 @@ describe("ElectronPlatform", () => {
292
303
} ) ;
293
304
} ) ;
294
305
295
- describe ( "breacrumbs " , ( ) => {
306
+ describe ( "breadcrumbs " , ( ) => {
296
307
it ( "should send breadcrumb updates over the IPC" , ( ) => {
297
308
const spy = jest . spyOn ( BreadcrumbsStore . instance , "on" ) ;
298
309
new ElectronPlatform ( ) ;
0 commit comments