refactor(test): centralize trigger and cron test helpers

This commit is contained in:
Peter Steinberger
2026-02-22 20:01:54 +00:00
parent 3c75bc0e41
commit 5e8b1f5ac8
21 changed files with 217 additions and 316 deletions

View File

@@ -0,0 +1,11 @@
export async function runWithModelFallback(params: {
provider: string;
model: string;
run: (provider: string, model: string) => Promise<unknown>;
}) {
return {
result: await params.run(params.provider, params.model),
provider: params.provider,
model: params.model,
};
}