test(api-keys): improve typings in wrapWithThen mock implementation
Some checks failed
CI/CD Pipeline / Valider backend (push) Failing after 1m2s
CI/CD Pipeline / Valider documentation (push) Successful in 1m34s
CI/CD Pipeline / Valider frontend (push) Successful in 1m32s
CI/CD Pipeline / Déploiement en Production (push) Has been skipped

This commit is contained in:
Mathis HERRIOT
2026-01-20 15:27:25 +01:00
parent 5f176def8c
commit f8eaad3f81

View File

@@ -19,11 +19,11 @@ describe("ApiKeysRepository", () => {
execute: jest.fn(),
};
const wrapWithThen = (obj: any) => {
const wrapWithThen = (obj: unknown) => {
// biome-ignore lint/suspicious/noThenProperty: 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,