mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
rewrite libsql and cloudflare sqlite's to use the generic adapter
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import type { MaybePromise } from "core/types";
|
||||
|
||||
export type Matcher<T = unknown> = {
|
||||
toEqual: (expected: T, failMsg?: string) => void;
|
||||
toBe: (expected: T, failMsg?: string) => void;
|
||||
@@ -16,7 +18,7 @@ export interface Test {
|
||||
skipIf: (condition: boolean) => (label: string, fn: TestFn) => void;
|
||||
}
|
||||
export type TestRunner = {
|
||||
describe: (label: string, asyncFn: () => Promise<void>) => void;
|
||||
describe: (label: string, asyncFn: () => MaybePromise<void>) => void;
|
||||
test: Test;
|
||||
mock: <T extends (...args: any[]) => any>(fn: T) => T | any;
|
||||
expect: <T = unknown>(
|
||||
@@ -26,6 +28,9 @@ export type TestRunner = {
|
||||
resolves: Matcher<Awaited<T>>;
|
||||
rejects: Matcher<Awaited<T>>;
|
||||
};
|
||||
beforeEach: (fn: () => MaybePromise<void>) => void;
|
||||
afterEach: (fn: () => MaybePromise<void>) => void;
|
||||
afterAll: (fn: () => MaybePromise<void>) => void;
|
||||
};
|
||||
|
||||
export async function retry<T>(
|
||||
|
||||
Reference in New Issue
Block a user