test(reports): update wrapWithThen mock to use stricter typings

This commit is contained in:
Mathis HERRIOT
2026-01-20 15:26:30 +01:00
parent 2291cc8afb
commit d0286d51ff

View File

@@ -21,11 +21,12 @@ describe("ReportsRepository", () => {
execute: jest.fn(),
};
const wrapWithThen = (obj: any) => {
const wrapWithThen = (obj: unknown) => {
// biome-ignore lint/suspicious/noThenProperty: Necessary to mock Drizzle's awaitable query builder
// biome-ignore lint/suspicious/noExplicitAny: Necessary to mock Drizzle's awaitable query builder
Object.defineProperty(obj, "then", {
value: function (onFulfilled: any) {
const result = this.execute();
value: function (onFulfilled: (arg0: unknown) => void) {
const result = (this as any).execute();
return Promise.resolve(result).then(onFulfilled);
},
configurable: true,