mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
test: add lint rule to forbid use of assert.ok(/regex/.test(…))
PR-URL: https://github.com/nodejs/node/pull/60832 Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
12 files changed
+43
-33
No files matched your search
@@ -165,7 +165,7 @@ function onSession(session, next) {
|
||||
.setEncoding('utf8')
|
||||
.on('data', (chunk) => text += chunk)
|
||||
.on('end', common.mustCall(() => {
|
||||
assert.ok(/Missing ALPN Protocol, expected `h2` to be available/.test(text));
|
||||
assert.match(text, /Missing ALPN Protocol, expected `h2` to be available/);
|
||||
cleanup();
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user