Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/kysely_postgrs_js_dialect/src/testing/utils.ts>setupTesting

Kysely dialect for PostgreSQL using the Postgres.js client.
Latest
function setupTesting
import { setupTesting } from "https://deno.land/x/kysely_postgrs_js_dialect@v0.27.8/src/testing/utils.ts";

Setup the database for testing. It will create a transaction for each test case and rollback the transaction after each test case.

Examples

Example 1

import { stub } from "jsr:@std/testing/mock";
import bdd from "jsr:@std/testing/bdd";
setupTesting({stub, ...bdd})

Parameters

unnamed 0: setupTestingOptions
  • The stub to use for wrapping the transaction.

Returns

void

void