test(13-08): satisfy vue-tsc -b build-mode checks in test files
npm run build runs vue-tsc -b (project references, noUncheckedIndexedAccess), stricter than the flat --noEmit used during Task 2 verification: indexed CustomEvent accesses need non-null assertions, the suspended-chat Promise needs an explicit <unknown> ctor, and one unused import. 41/41 still green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
8a19e8d3f8
commit
cfbbd268e5
@@ -75,7 +75,7 @@ describe('tool confirmation — ContextBroker half', () => {
|
||||
let releaseChat: (v: unknown) => void = () => {}
|
||||
vi.mocked(rpcClient.call).mockImplementation((opts: { method: string }) => {
|
||||
if (opts.method === 'assistant.chat') {
|
||||
return new Promise((resolve) => {
|
||||
return new Promise<unknown>((resolve) => {
|
||||
releaseChat = resolve
|
||||
}) as Promise<never>
|
||||
}
|
||||
@@ -101,8 +101,8 @@ describe('tool confirmation — ContextBroker half', () => {
|
||||
await vi.advanceTimersByTimeAsync(2000)
|
||||
|
||||
expect(confirmRequests).toHaveLength(1)
|
||||
expect(confirmRequests[0].detail.reqId).toBe('confirm-1')
|
||||
expect(confirmRequests[0].detail.description).toBe(PENDING_IMMICH.description)
|
||||
expect(confirmRequests[0]!.detail.reqId).toBe('confirm-1')
|
||||
expect(confirmRequests[0]!.detail.description).toBe(PENDING_IMMICH.description)
|
||||
|
||||
// The same pending action is never re-announced while it is open.
|
||||
await vi.advanceTimersByTimeAsync(3000)
|
||||
@@ -214,7 +214,7 @@ describe('tool confirmation — ContextBroker half', () => {
|
||||
let releaseChat: (v: unknown) => void = () => {}
|
||||
vi.mocked(rpcClient.call).mockImplementation((opts: { method: string }) => {
|
||||
if (opts.method === 'assistant.chat') {
|
||||
return new Promise((resolve) => {
|
||||
return new Promise<unknown>((resolve) => {
|
||||
releaseChat = resolve
|
||||
}) as Promise<never>
|
||||
}
|
||||
@@ -240,9 +240,9 @@ describe('tool confirmation — ContextBroker half', () => {
|
||||
await vi.advanceTimersByTimeAsync(2000)
|
||||
|
||||
expect(confirmRequests).toHaveLength(2)
|
||||
expect(confirmRequests[1].detail.reqId).toBe('confirm-2')
|
||||
expect(confirmRequests[1].detail.description).toBe(PENDING_GITEA.description)
|
||||
expect(confirmRequests[1].detail.description).not.toBe(PENDING_IMMICH.description)
|
||||
expect(confirmRequests[1]!.detail.reqId).toBe('confirm-2')
|
||||
expect(confirmRequests[1]!.detail.description).toBe(PENDING_GITEA.description)
|
||||
expect(confirmRequests[1]!.detail.description).not.toBe(PENDING_IMMICH.description)
|
||||
|
||||
releaseChat({ text: 'done' })
|
||||
await chat
|
||||
|
||||
Reference in New Issue
Block a user