Skip to content

Commit d6874db

Browse files
committed
Fix tc
1 parent f78701f commit d6874db

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/rpc/references.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,15 @@ describe('buildReferenceFn', () => {
7777

7878
it('returns undefined for missing references', async () => {
7979
const fn = buildReferenceFn({})
80-
const result = await fn('nonexistent', undefined)
80+
expect(fn).toBeDefined()
81+
const result = await fn!('nonexistent', undefined)
8182
expect(result).toBeUndefined()
8283
})
84+
85+
it('returns undefined when references is undefined', () => {
86+
const fn = buildReferenceFn(undefined)
87+
expect(fn).toBeUndefined()
88+
})
8389
})
8490

8591
describe('scanPrompt with references', () => {

0 commit comments

Comments
 (0)