test(workflow): add comprehensive hooks unit tests and refactor test infrastructure (Part 3) (#32958)

Co-authored-by: CodingOnStar <hanxujiang@dify.com>
This commit is contained in:
Coding On Star
2026-03-04 17:24:50 +08:00
committed by GitHub
parent 5a3348ec8d
commit 5385ec3023
37 changed files with 3615 additions and 729 deletions

View File

@ -281,7 +281,7 @@ describe('Form Helpers', () => {
describe('Edge cases', () => {
it('should handle objects with non-string keys', () => {
const input = { [Symbol('test')]: 'value', regular: 'field' } as any
const input = { [Symbol('test')]: 'value', regular: 'field' } as Record<string, unknown>
const result = sanitizeFormValues(input)
expect(result.regular).toBe('field')
@ -299,7 +299,7 @@ describe('Form Helpers', () => {
})
it('should handle circular references in deepSanitizeFormValues gracefully', () => {
const obj: any = { field: 'value' }
const obj: Record<string, unknown> = { field: 'value' }
obj.circular = obj
expect(() => deepSanitizeFormValues(obj)).not.toThrow()