mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
docs(assert): update assertMatch
example (#5294)
This commit is contained in:
parent
ed1ab2684a
commit
99764a7869
@ -10,8 +10,8 @@ import { AssertionError } from "./assertion_error.ts";
|
||||
* ```ts no-eval
|
||||
* import { assertMatch } from "@std/assert";
|
||||
*
|
||||
* assertMatch("Raptor", RegExp(/Raptor/)); // Doesn't throw
|
||||
* assertMatch("Denosaurus", RegExp(/Raptor/)); // Throws
|
||||
* assertMatch("Raptor", /Raptor/); // Doesn't throw
|
||||
* assertMatch("Denosaurus", /Raptor/); // Throws
|
||||
* ```
|
||||
*
|
||||
* @param actual The actual value to be matched.
|
||||
|
@ -10,8 +10,8 @@ import { AssertionError } from "./assertion_error.ts";
|
||||
* ```ts no-eval
|
||||
* import { assertNotMatch } from "@std/assert";
|
||||
*
|
||||
* assertNotMatch("Denosaurus", RegExp(/Raptor/)); // Doesn't throw
|
||||
* assertNotMatch("Raptor", RegExp(/Raptor/)); // Throws
|
||||
* assertNotMatch("Denosaurus", /Raptor/); // Doesn't throw
|
||||
* assertNotMatch("Raptor", /Raptor/); // Throws
|
||||
* ```
|
||||
*
|
||||
* @param actual The actual value to match.
|
||||
|
Loading…
Reference in New Issue
Block a user