test_runner: remove no-op validation

The code already checks if testNamePatterns is an
array, and converts it to an array if it is not.

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
cjihrig authored and Michaël Zasso committed 2023-05-02 09:34:06 +02:00
1 parent 84fa9fd725
commit f8581e7629
1 file changed
+1 -1
+1 -1
View File
@@ -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;