delay -> sleep, style tweaks

This commit is contained in:
Alex Gleason
2024-07-11 17:19:47 -05:00
parent 9584638d5c
commit cd961dad86
3 changed files with 9 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ export class DittoPostgres {
if (!this.db) {
this.db = new Kysely({
dialect: new PostgresJSDialect({
postgres: this.postgres as any,
postgres: this.postgres,
}),
log: KyselyLogger,
});

View File

@@ -63,4 +63,6 @@ export async function getTestDB() {
};
}
export const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
export function sleep(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
}