Compare commits
5 Commits
2291cc8afb
...
v1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8eaad3f81
|
||
|
|
5f176def8c
|
||
|
|
9ef6bbfd96
|
||
|
|
61b25f7b9e
|
||
|
|
d0286d51ff
|
@@ -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,
|
||||
|
||||
@@ -75,6 +75,7 @@ describe("AuthController", () => {
|
||||
password: "password",
|
||||
username: "test",
|
||||
};
|
||||
// biome-ignore lint/suspicious/noExplicitAny: Necessary to avoid defining full DTO in test
|
||||
await controller.register(dto as any);
|
||||
expect(authService.register).toHaveBeenCalledWith(dto);
|
||||
});
|
||||
|
||||
@@ -20,11 +20,11 @@ describe("CategoriesRepository", () => {
|
||||
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,
|
||||
|
||||
@@ -19,11 +19,12 @@ describe("FavoritesRepository", () => {
|
||||
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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user