Skip to content

Commit d7baec2

Browse files
committed
fix(search): use the shared deferred test helper
1 parent 3b1f227 commit d7baec2

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

‎apps/sim/lib/knowledge/search/diagnostics.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { createDeferred } from '@sim/testing/helpers'
12
import { getMockLogger } from '@sim/testing/mocks/logger.mock'
23
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
34
import {
@@ -144,7 +145,7 @@ describe('search pipeline diagnostics', () => {
144145
})
145146

146147
it('records preview failures that settle after the search has returned', async () => {
147-
const pending = Promise.withResolvers<void>()
148+
const pending = createDeferred<void>()
148149
let request: Promise<unknown> | undefined
149150
await withSearchDiagnostics({}, () =>
150151
withSearchProviderDiagnostics({ provider: 'gmail', accountIndex: 0 }, async () => {

‎scripts/check-test-types.baseline.json‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,9 +1719,6 @@
17191719
"apps/sim/lib/knowledge/reranker.test.ts": {
17201720
"TS2540": 2
17211721
},
1722-
"apps/sim/lib/knowledge/search/diagnostics.test.ts": {
1723-
"TS2345": 2
1724-
},
17251722
"apps/sim/lib/knowledge/search/prewarm.test.ts": {
17261723
"TS2345": 4
17271724
},

0 commit comments

Comments
 (0)