Skip to content

Commit

Permalink
test_runner: remove no-op validation
Browse files Browse the repository at this point in the history
The code already checks if testNamePatterns is an
array, and converts it to an array if it is not.

PR-URL: #47687
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
  • Loading branch information
cjihrig authored and MoLow committed Jul 6, 2023
1 parent d0ad873 commit cb3abda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/test_runner/runner.js
Expand Up @@ -390,7 +390,7 @@ function run(options) {
if (!ArrayIsArray(testNamePatterns)) {
testNamePatterns = [testNamePatterns];
}
validateArray(testNamePatterns, 'options.testNamePatterns');

testNamePatterns = ArrayPrototypeMap(testNamePatterns, (value, i) => {
if (isRegExp(value)) {
return value;
Expand Down

0 comments on commit cb3abda

Please sign in to comment.