refactor: type improvements that doesn't modify functionality (#17970)

This commit is contained in:
yusheng chen
2025-04-14 16:06:10 +08:00
committed by GitHub
parent 53efb2bad5
commit 4c99e9dc73
39 changed files with 69 additions and 63 deletions

View File

@@ -7,10 +7,10 @@ describe('loop', () => {
const [startNode, loopNode, ...loops] = list
const result = format(list as any, noop)
test('result should have no nodes in loop node', () => {
expect((result as any).find((item: any) => !!item.execution_metadata?.loop_id)).toBeUndefined()
expect(result.find(item => !!item.execution_metadata?.loop_id)).toBeUndefined()
})
test('loop should put nodes in details', () => {
expect(result as any).toEqual([
expect(result).toEqual([
startNode,
{
...loopNode,

View File

@@ -7,7 +7,7 @@ describe('retry', () => {
const [startNode, retryNode, ...retryDetail] = steps
const result = format(steps as any)
test('should have no retry status nodes', () => {
expect(result.find(item => (item as any).status === 'retry')).toBeUndefined()
expect(result.find(item => item.status === 'retry')).toBeUndefined()
})
test('should put retry nodes in retryDetail', () => {
expect(result).toEqual([