Skip to main content
The Deno 2 Release Candidate is 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@0.27.7/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