This is a string literal that expect() will match exactly in its parameter
position. The phrase describes the natural language expectation for the
assertion. If the first item in assertion parts is a phrase literal, a
subject slot (unknown) is automatically added.
Phrases cannot start with "not " as this would conflict with negation logic.
Example
// Valid phrase literals typePhrase1='to be a string'; typePhrase2='to have length'; typePhrase3='to contain';
// Usage in assertion createAssertion(['to be a string'],z.string()); // expect(value, 'to be a string') ✓
Type representing a single phrase literal string.
This is a string literal that
expect()
will match exactly in its parameter position. The phrase describes the natural language expectation for the assertion. If the first item in assertion parts is a phrase literal, a subject slot (unknown
) is automatically added.Phrases cannot start with "not " as this would conflict with negation logic.