Skip to main content

StringSuffix

Matches any string that begins with a matchable prefix, and ends with a constant suffix.

At match time, the actual string is checked for the expected constant suffix, and then the beginning of the string is passed to the prefix matcher.

The prefix matcher must be expecting a string.

See also StringPrefix

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

new matchers.strings.StringSuffix(prefix: any, suffix: string)

Parameters

NameTypeDescription
prefixanyA string or matcher to match against the prefix.
If you don't mind what the prefix is, pass null / undefined
suffixstringThe suffix for the matched string.
Must be a string and not a matcher