feat: plugin auto upgrade strategy (#19758)
Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Novice <novice12185727@gmail.com>
This commit is contained in:

committed by
GitHub

parent
e6913744ae
commit
eaae79a581
@@ -0,0 +1,14 @@
|
||||
import { convertLocalSecondsToUTCDaySeconds, convertUTCDaySecondsToLocalSeconds } from './utils'
|
||||
|
||||
describe('convertLocalSecondsToUTCDaySeconds', () => {
|
||||
it('should convert local seconds to UTC day seconds correctly', () => {
|
||||
const localTimezone = 'Asia/Shanghai'
|
||||
const utcSeconds = convertLocalSecondsToUTCDaySeconds(0, localTimezone)
|
||||
expect(utcSeconds).toBe((24 - 8) * 3600)
|
||||
})
|
||||
|
||||
it('should convert local seconds to UTC day seconds for a specific time', () => {
|
||||
const localTimezone = 'Asia/Shanghai'
|
||||
expect(convertUTCDaySecondsToLocalSeconds(convertLocalSecondsToUTCDaySeconds(0, localTimezone), localTimezone)).toBe(0)
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user