Skip to main content

WithExample

Adds an example to the provided matcher.

Useful when you have a complicated set of constraints and ContractCase can't figure out what the best example should be.

Note that providing any example will override examples provided further down the tree.

import { matchers } from '@contract-case/case-definition-dsl'

new matchers.convenience.WithExample(matcher: any, example: any)

Parameters

NameTypeDescription
matcheranyAny matcher to add an example to.
exampleanyThe example to use when stripping the matchers.