diff options
author | Michaël Zasso <targos@protonmail.com> | 2021-08-29 11:14:22 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-08-31 19:50:16 +0300 |
commit | 508890d79594bab77d4fb084d9df3284c0550b29 (patch) | |
tree | d44d70d5298d1cddaebf263dafa682d507123f3c /test/sequential/test-inspector.js | |
parent | 162f07b7af24692de32d47b26e7cc5e52fc4e0c2 (diff) |
test: use `assert.match` instead of `regexp.test`
PR-URL: https://github.com/nodejs/node/pull/39928
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Diffstat (limited to 'test/sequential/test-inspector.js')
-rw-r--r-- | test/sequential/test-inspector.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sequential/test-inspector.js b/test/sequential/test-inspector.js index 84e0bb1c5e0..a62013ebb46 100644 --- a/test/sequential/test-inspector.js +++ b/test/sequential/test-inspector.js @@ -32,8 +32,8 @@ function checkVersion(response) { function checkBadPath(err) { assert(err instanceof SyntaxError); - assert(/Unexpected token/.test(err.message), err.message); - assert(/WebSockets request was expected/.test(err.body), err.body); + assert.match(err.message, /Unexpected token/); + assert.match(err.body, /WebSockets request was expected/); } function checkException(message) { |