Skip to content

Commit 05079c5

Browse files
committed
test(plugin-webhooks): type the engine options in the real-driver delivery pin
The query-options-erasure ratchet counts an 'as any' on engine options in tests; both options bags are already their contract types. Claude-Session: https://claude.ai/code/session_011TdZ8GjixNZFLz1xJD9zzK Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5755b9d commit 05079c5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/plugins/plugin-webhooks/src/webhook-delivery-real-sql-driver.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { AutoEnqueuer } from './auto-enqueuer.js';
3535
import { DeclaredWebhookSource, declaredWebhookRefId } from './declared-webhooks.js';
3636
import { SysWebhook } from './sys-webhook.object.js';
3737

38-
const SYSTEM = { context: { isSystem: true } } as const;
38+
const SYSTEM = { context: { isSystem: true } };
3939

4040
function driverUnderTest(): SqlDriver {
4141
return new SqlDriver({ client: 'better-sqlite3', connection: { filename: ':memory:' }, useNullAsDefault: true });
@@ -110,14 +110,14 @@ describe('#24835 — a webhook delivery is stored for an update on a real SqlDri
110110
declaredWebhooks: new DeclaredWebhookSource(engine, { list: (type: string) => (type === 'webhook' ? [DECLARED] : []) }),
111111
logger,
112112
});
113-
const deliveries = async () => (await engine.find('sys_http_delivery', {}, SYSTEM as any)) as any[];
113+
const deliveries = async () => (await engine.find('sys_http_delivery', {}, SYSTEM)) as any[];
114114

115115
try {
116116
await enqueuer.start();
117117
const created: any = await engine.insert('probe_task', { title: 'seed' });
118118
await waitFor(async () => (await deliveries()).length >= 1);
119119
const patch = { title: 'webhook probe' };
120-
await engine.update('probe_task', patch, { where: { id: created.id } } as any);
120+
await engine.update('probe_task', patch, { where: { id: created.id } });
121121
await waitFor(async () => (await deliveries()).length >= 2);
122122

123123
const rows = await deliveries();

0 commit comments

Comments
 (0)