mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
test(web): add comprehensive unit and integration tests for plugins and tools modules (#32220)
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -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