Skip to content

Commit 7207974

Browse files
committed
test(knowledge): pin the exact indexed-text boundary
1 parent 24f0611 commit 7207974

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎apps/sim/lib/knowledge/connectors/sync-persistence.test.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,7 @@ describe('persistSourceDocumentFailures', () => {
364364
priorByExternalId: new Map(),
365365
})
366366
const [rows] = dbChainMockFns.values.mock.calls[0] as [Array<{ filename: string }>]
367-
expect(rows[0].filename.length).toBeLessThan(600)
368-
expect(rows[0].filename.startsWith('xxxx')).toBe(true)
367+
expect(rows[0].filename).toBe(`${'x'.repeat(512)}...`)
369368
})
370369
it('refuses to commit a failure under a reclaimed lease', async () => {
371370
queueTableRows(schemaMock.knowledgeBase, [{ id: 'kb' }])
@@ -441,8 +440,7 @@ describe('resolveTagMapping', () => {
441440
{ label: 'y'.repeat(5000) },
442441
{ tagSlotMapping: { label: 'tag1' } }
443442
)
444-
expect(tags?.tag1?.length).toBeLessThan(600)
445-
expect(tags?.tag1?.startsWith('yyyy')).toBe(true)
443+
expect(tags?.tag1).toBe(`${'y'.repeat(512)}...`)
446444
})
447445

448446
it('keeps a short mapped tag value intact', () => {

0 commit comments

Comments
 (0)