fix: 修复useTheme.spec.ts单测失败问题

This commit is contained in:
XiaoDaiGua-Ray 2024-05-17 15:30:08 +08:00
parent 27db2293f3
commit 52dc6038da

View File

@ -31,16 +31,16 @@ describe('useTheme', async () => {
it('should return current theme', () => {
darkTheme()
const { theme: darkTheme, themeLabel: darkThemeLabel } = getAppTheme()
const { theme: _darkTheme, themeLabel: _darkThemeLabel } = getAppTheme()
expect(darkTheme).toBe(true)
expect(darkThemeLabel).toBe('暗色')
expect(_darkTheme).toBe(true)
expect(_darkThemeLabel).toBe('Dark')
lightTheme()
const { theme: lightTheme, themeLabel: lightThemeLabel } = getAppTheme()
const { theme: __lightTheme, themeLabel: __lightThemeLabel } = getAppTheme()
expect(lightTheme).toBe(false)
expect(lightThemeLabel).toBe('明亮')
expect(__lightTheme).toBe(false)
expect(__lightThemeLabel).toBe('Light')
})
})