Like test

Learn how to check if a string includes another substring.

This test checks if one string is equal to another string or contains it.

The test is case-insensitive, meaning that the strings match regardless of capitalization. For example, "Hello world" is like "Hello" and "hello".

Syntax

This test has the following syntax:

/*<value>*/ is like /*<term>*/

To negate the test, you can write:

/*<value>*/ is not like /*<term>*/

Parameters

These are the supported parameters:

value

The string to validate.

term

A term to check if the string includes.

Examples

Here is a basic example that checks if a string is like another string:

"Hello world" is like "hello" // true

You can negate the test to verify the contrary:

"Hello world" is not like "hello" // false