Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/cotton/src/testutils.ts>testQueryCompiler

SQL Database Toolkit for Deno
Latest
function testQueryCompiler
import { testQueryCompiler } from "https://deno.land/x/cotton@v0.7.5/src/testutils.ts";

Generate a test case for testing QueryCompiler. This will create a new QueryCompiler and test it agaist the expected query string and values.

Parameters

title: string

the title of the test

description: Partial<QueryDescription>

the query description (comes from the QueryBuilder)

result: { mysql: { text: string; values: any[]; }; postgres: { text: string; values: any[]; }; sqlite: { text: string; values: any[]; }; }

the expected query string and values for multiple database dialects