mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(api): ♻️ Refactor all tests to use new client
This commit is contained in:
parent
b6373dc185
commit
54e282b03c
31 changed files with 1607 additions and 2002 deletions
|
|
@ -38,6 +38,7 @@ export const generateClient = async (
|
|||
): Promise<
|
||||
VersiaClient & {
|
||||
[Symbol.asyncDispose](): Promise<void>;
|
||||
dbToken: Token;
|
||||
}
|
||||
> => {
|
||||
const token = user
|
||||
|
|
@ -69,8 +70,12 @@ export const generateClient = async (
|
|||
await token?.delete();
|
||||
};
|
||||
|
||||
// @ts-expect-error More monkeypatching
|
||||
client.dbToken = token;
|
||||
|
||||
return client as VersiaClient & {
|
||||
[Symbol.asyncDispose](): Promise<void>;
|
||||
dbToken: Token;
|
||||
};
|
||||
};
|
||||
export const deleteOldTestUsers = async (): Promise<void> => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue