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 <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Deokjin Kim <[email protected]>
  • Loading branch information
cjihrig authored Apr 25, 2023
1 parent a5ce18f commit ab3a54f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/test_runner/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,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 ab3a54f

Please sign in to comment.