@@ -83,6 +83,17 @@ assert.instance([1, 2, 3], Array);
83
83
assert .instance (/ foobar/ gi , RegExp );
84
84
```
85
85
86
+ ### match(actual: string, expects: RegExp | String, msg?: Message)
87
+ Assert that ` actual ` matches the ` expects ` pattern.
88
+
89
+ When ` expects ` is a regular expression, it must match the ` actual ` value.
90
+ When ` expects ` is a string, it must exist within the ` actual ` value as a substring.
91
+
92
+ ``` js
93
+ assert .match (' hello world' , ' wor' );
94
+ assert .match (' hello world' , / ^ hel/ );
95
+ ```
96
+
86
97
### snapshot(actual: string, expects: string, msg?: Message)
87
98
Assert that ` actual ` matches the ` expects ` multi-line string.
88
99
@@ -176,6 +187,17 @@ assert.not.instance([1, 2, 3], String);
176
187
assert .not .instance (/ foobar/ gi , Date );
177
188
```
178
189
190
+ ### not.match(actual: string, expects: RegExp | String, msg?: Message)
191
+ Assert that ` actual ` does not match the ` expects ` pattern.
192
+
193
+ When ` expects ` is a regular expression, it must not match the ` actual ` value.
194
+ When ` expects ` is a string, it must not exist within the ` actual ` value as a substring.
195
+
196
+ ``` js
197
+ assert .not .match (' hello world' , ' other' );
198
+ assert .not .match (' hello world' , / other/ g );
199
+ ```
200
+
179
201
### not.snapshot(actual: string, expects: string, msg?: Message)
180
202
Assert that ` actual ` does not match the ` expects ` snapshot.
181
203
0 commit comments