diff options
Diffstat (limited to 'packages/main/src/controllers/__tests__/initNativeTheme.spec.ts')
-rw-r--r-- | packages/main/src/controllers/__tests__/initNativeTheme.spec.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts b/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts index 16acca5..9107c78 100644 --- a/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts +++ b/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts | |||
@@ -21,7 +21,7 @@ | |||
21 | import { jest } from '@jest/globals'; | 21 | import { jest } from '@jest/globals'; |
22 | import { mocked } from 'jest-mock'; | 22 | import { mocked } from 'jest-mock'; |
23 | 23 | ||
24 | import { createMainStore, MainStore } from '../../stores/MainStore'; | 24 | import { sharedStore, SharedStore } from '../../stores/SharedStore'; |
25 | import type Disposer from '../../utils/Disposer'; | 25 | import type Disposer from '../../utils/Disposer'; |
26 | 26 | ||
27 | let shouldUseDarkColors = false; | 27 | let shouldUseDarkColors = false; |
@@ -40,11 +40,11 @@ jest.unstable_mockModule('electron', () => ({ | |||
40 | const { nativeTheme } = await import('electron'); | 40 | const { nativeTheme } = await import('electron'); |
41 | const { default: initNativeTheme } = await import('../initNativeTheme'); | 41 | const { default: initNativeTheme } = await import('../initNativeTheme'); |
42 | 42 | ||
43 | let store: MainStore; | 43 | let store: SharedStore; |
44 | let disposeSut: Disposer; | 44 | let disposeSut: Disposer; |
45 | 45 | ||
46 | beforeEach(() => { | 46 | beforeEach(() => { |
47 | store = createMainStore(); | 47 | store = sharedStore.create(); |
48 | disposeSut = initNativeTheme(store); | 48 | disposeSut = initNativeTheme(store); |
49 | }); | 49 | }); |
50 | 50 | ||
@@ -53,7 +53,7 @@ it('should register a nativeTheme updated listener', () => { | |||
53 | }); | 53 | }); |
54 | 54 | ||
55 | it('should synchronize themeSource changes to the nativeTheme', () => { | 55 | it('should synchronize themeSource changes to the nativeTheme', () => { |
56 | store.config.setThemeSource('dark'); | 56 | store.settings.setThemeSource('dark'); |
57 | expect(nativeTheme.themeSource).toBe('dark'); | 57 | expect(nativeTheme.themeSource).toBe('dark'); |
58 | }); | 58 | }); |
59 | 59 | ||
@@ -63,7 +63,7 @@ it('should synchronize shouldUseDarkColors changes to the store', () => { | |||
63 | )![1]; | 63 | )![1]; |
64 | shouldUseDarkColors = true; | 64 | shouldUseDarkColors = true; |
65 | listener(); | 65 | listener(); |
66 | expect(store.shared.shouldUseDarkColors).toBe(true); | 66 | expect(store.shouldUseDarkColors).toBe(true); |
67 | }); | 67 | }); |
68 | 68 | ||
69 | it('should remove the listener on dispose', () => { | 69 | it('should remove the listener on dispose', () => { |