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

x/pact/src/deps.dev.ts>DenoPact

Pact 🔗 Contract Testing for Deno 🦕, Powered by Rust 🦀
Latest
class DenoPact
import { DenoPact } from "https://deno.land/x/pact@0.1.0/src/deps.dev.ts";

Constructors

new
DenoPact()

Properties

private
appName: string
private
ffi: PactFfi
private
interaction: Pact.InteractionHandle | null
private
matched: number
private
mismatches: string | null
private
mockServerPort: number | null
private
pact: Pact.PactHandle | null
private
PACT_FILE_DIR: string
private
syncHttpPact: Pointer<StructPointer<"SynchronousHttp">> | null
private
verificationResult: number | null
private
verificationResultsFileName: string
private
verificationResultsJson: any | null
private
verifierHandle: Pact.VerifierHandle | null
private
version: string
private
writeVerificationResultsToFile: boolean

Methods

private
arr2Ptrs(arr: string[])
private
arrJson2Ptrs(arr: { [key: string]: string | boolean; }[])
addMetaDataToPact(value: string, key?)
createMockServer(
hostname?,
port?,
)
createMockServerForTransport(
transport: string,
address?,
port?,
transportOptions?: 0 | any,
)
executeTest(callback: () => Promise<void>)
given(description: string)
givenWithParam(
description: string,
name: string,
value: string,
)
logMessage(msg: string, level?)
newInteraction(description: string)
newPact(consumer_name: string, provider_name: string)
newSyncMessageInteraction(description: string)
syncHttpSetRequestContents(contents: any, contentType: string)
syncHttpSetRequestDescription(description: string)
syncHttpSetResponseContents(contents: any, contentType: string)
uponReceiving(description: string)
usingPactPlugin(pluginName: string, pluginVersion?)
verifierAddDirectorySource(args: { pathToDir: string; })
verifierAddFileSource(args: { pathToFile: string; })
verifierAddProviderTransports(args: { protocol?: string; path?: string; scheme?: string; port?: number; }[])
verifierAddUrlSource(args: { url: string; username?: string; password?: string; token?: string; })
verifierBrokerSource(args: { url: string; username?: string; password?: string; token?: string; })
verifierBrokerSourceWithSelectors(args: { url: string; username?: string; password?: string; token?: string; enablePending?: boolean; includeWipPactsSince?: string | true; providerTags?: string[]; providerBranch?: string; consumerVersionSelectors?: { [key: string]: string | boolean; }[]; consumerVersionTags?: string[]; })
verifierSetConsumerFilters(args: { names?: string[]; })
verifierSetFilterInfo(args: { description?: string; state?: string; noState?: boolean; })
verifierSetProviderInfo(args: { name?: string; scheme?: string; host?: string; port?: number; path?: string; })
verifierSetPublishOptions(args: { providerVersion?: string; buildUrl?: string; providerBranch?: string; providerTags?: string[]; })
verifierSetVerificationOptions(args: { disableSslVerification: boolean; requestTime?: number; })
withBody(
interactionPart: Pact.InteractionPart,
contentType: string,
contents: any,
)
withHeader(
interactionPart: Pact.InteractionPart,
headerName: string,
headerValue: string,
)
withInteractionContents(
interactionPart: Pact.InteractionPart,
transportType: string,
contents: any,
)
withQueryParamV2(params: { name: string; value: string; }[])
withRequest(path: string, method?)
withResponse(code: number)
writePactFiles(pactDir?: string, writePactIfNoMatches?: boolean)