better-cypress-testrail-reporter
Advanced tools
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TestRailValidation = void 0; | ||
var glob = require("glob"); | ||
var glob = require("glob-all"); | ||
var TestRailLogger = require("./testrail.logger"); | ||
@@ -81,4 +81,3 @@ var TestRailValidation = /** @class */ (function () { | ||
*/ | ||
var pat = /\/([^\/]*?\*.*|[^\/]*$)/; | ||
var index, value, result, directory, pattern; | ||
var index, value, result; | ||
var searchPattern = []; | ||
@@ -97,24 +96,3 @@ var specFiles = []; | ||
var specArg = result.split(/,/); | ||
for (index = 0; index < specArg.length; ++index) { | ||
value = specArg[index]; | ||
directory = value.replace(pat, "/"); | ||
pattern = value.match(pat)[1]; | ||
searchPattern.push([pattern, directory]); | ||
} | ||
for (index = 0; index < searchPattern.length; ++index) { | ||
value = searchPattern[index][1]; | ||
var options = { | ||
cwd: value, | ||
nodir: true, | ||
}; | ||
result = glob.sync(searchPattern[index][0], options); | ||
specFiles.push(result); | ||
} | ||
/** | ||
* Since in previous steps we create 2D array, | ||
* we need to covert it to 1D in order to get desired length | ||
*/ | ||
for (index = 0; index < specFiles.length; ++index) { | ||
specFilesArray = specFilesArray.concat(specFiles[index]); | ||
} | ||
specFilesArray = glob.sync(specArg, { nodir: true }); | ||
return specFilesArray; | ||
@@ -121,0 +99,0 @@ }; |
{ | ||
"name": "better-cypress-testrail-reporter", | ||
"version": "1.3.7", | ||
"version": "1.3.8", | ||
"description": "A Testrail reporter for cypress including TestRail API basic library", | ||
@@ -36,3 +36,3 @@ "main": "index.js", | ||
"form-data": "^4.0.0", | ||
"glob": "^7.1.7", | ||
"glob-all": "^3.3.0", | ||
"mocha": "^8.4.0", | ||
@@ -39,0 +39,0 @@ "moment": "^2.29.1" |
35979
-2.38%600
-3.54%