Skip to main content

NamedMatch

Saves the matcher below it with a unique name that can be used with lookups in tests after this one.

Lookups can be made with matchers.convenience.ReferenceMatch.

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

new matchers.convenience.NamedMatch(name: string, child: any)

Parameters

NameTypeDescription
namestringThe name you can use to lookup this matcher later.
childanyThe content of this named match.
If omitted or undefined, the content will be looked up in a previously named match