diff options
Diffstat (limited to 'packages/main/src/controllers/__tests__/initNativeTheme.spec.ts')
-rw-r--r-- | packages/main/src/controllers/__tests__/initNativeTheme.spec.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts b/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts index bd33f48..d4068af 100644 --- a/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts +++ b/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts | |||
@@ -58,14 +58,18 @@ it('should synchronize themeSource changes to the nativeTheme', () => { | |||
58 | }); | 58 | }); |
59 | 59 | ||
60 | it('should synchronize shouldUseDarkColors changes to the store', () => { | 60 | it('should synchronize shouldUseDarkColors changes to the store', () => { |
61 | const listener = mocked(nativeTheme.on).mock.calls.find(([event]) => event === 'updated')![1]; | 61 | const listener = mocked(nativeTheme.on).mock.calls.find( |
62 | ([event]) => event === 'updated', | ||
63 | )![1]; | ||
62 | shouldUseDarkColors = true; | 64 | shouldUseDarkColors = true; |
63 | listener(); | 65 | listener(); |
64 | expect(store.shared.shouldUseDarkColors).toBe(true); | 66 | expect(store.shared.shouldUseDarkColors).toBe(true); |
65 | }); | 67 | }); |
66 | 68 | ||
67 | it('should remove the listener on dispose', () => { | 69 | it('should remove the listener on dispose', () => { |
68 | const listener = mocked(nativeTheme.on).mock.calls.find(([event]) => event === 'updated')![1]; | 70 | const listener = mocked(nativeTheme.on).mock.calls.find( |
71 | ([event]) => event === 'updated', | ||
72 | )![1]; | ||
69 | disposeSut(); | 73 | disposeSut(); |
70 | expect(nativeTheme.off).toBeCalledWith('updated', listener); | 74 | expect(nativeTheme.off).toBeCalledWith('updated', listener); |
71 | }); | 75 | }); |