datagrok-tools 4.13.43 → 4.13.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/bin/commands/test.js +7 -5
- package/bin/utils/test-utils.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/bin/commands/test.js
CHANGED
|
@@ -24,7 +24,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
24
24
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
25
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } /* eslint-disable max-len */
|
|
26
26
|
var testInvocationTimeout = 3600000;
|
|
27
|
-
var availableCommandOptions = ['host', 'package', 'csv', 'gui', 'catchUnhandled', 'platform', 'core', 'report', 'skip-build', 'skip-publish', 'path', 'record', 'verbose', 'benchmark', 'category', 'test', 'stress-test', 'link', 'tag'];
|
|
27
|
+
var availableCommandOptions = ['host', 'package', 'csv', 'gui', 'catchUnhandled', 'platform', 'core', 'report', 'skip-build', 'skip-publish', 'path', 'record', 'verbose', 'benchmark', 'category', 'test', 'stress-test', 'link', 'tag', 'ci-cd'];
|
|
28
28
|
var curDir = process.cwd();
|
|
29
29
|
var grokDir = _path["default"].join(_os["default"].homedir(), '.grok');
|
|
30
30
|
var confPath = _path["default"].join(grokDir, 'config.yaml');
|
|
@@ -137,7 +137,7 @@ function _runTesting() {
|
|
|
137
137
|
workerId = 1;
|
|
138
138
|
_context3.next = 14;
|
|
139
139
|
return (0, _testUtils.timeout)( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
140
|
-
var _args$benchmark, _args$catchUnhandled, _args$gui, _args$record, _args$report, _args$verbose, testsLeft, testsToReproduce, _iterator2, _step2, testData, reproduced, _iterator3, _step3, _test2, _reproducedTest2;
|
|
140
|
+
var _args$benchmark, _args$catchUnhandled, _args$gui, _args$record, _args$report, _args$verbose, _args$ciCd, testsLeft, testsToReproduce, _iterator2, _step2, testData, reproduced, _iterator3, _step3, _test2, _reproducedTest2;
|
|
141
141
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
142
142
|
while (1) switch (_context2.prev = _context2.next) {
|
|
143
143
|
case 0:
|
|
@@ -149,6 +149,7 @@ function _runTesting() {
|
|
|
149
149
|
record: (_args$record = args.record) !== null && _args$record !== void 0 ? _args$record : false,
|
|
150
150
|
report: (_args$report = args.report) !== null && _args$report !== void 0 ? _args$report : false,
|
|
151
151
|
verbose: (_args$verbose = args.verbose) !== null && _args$verbose !== void 0 ? _args$verbose : false,
|
|
152
|
+
ciCd: (_args$ciCd = args['ci-cd']) !== null && _args$ciCd !== void 0 ? _args$ciCd : false,
|
|
152
153
|
stopOnTimeout: true
|
|
153
154
|
}, workerId, testInvocationTimeout);
|
|
154
155
|
case 2:
|
|
@@ -159,7 +160,7 @@ function _runTesting() {
|
|
|
159
160
|
try {
|
|
160
161
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
161
162
|
testData = _step2.value;
|
|
162
|
-
if (!r.
|
|
163
|
+
if (!r.verbosePassed.includes("".concat(testData.params.category, ": ").concat(testData.params.test)) && !r.verboseSkipped.includes("".concat(testData.params.category, ": ").concat(testData.params.test)) && !r.verboseFailed.includes("".concat(testData.params.category, ": ").concat(testData.params.test)) && !new RegExp("".concat(testData.params.category.trim(), "[^\\n]*: (before|after)")).test(r.verboseFailed)) testsLeft.push(testData);
|
|
163
164
|
if (r.verboseFailed.includes("".concat(testData.params.category, ": ").concat(testData.params.test, " : Error:"))) {
|
|
164
165
|
testsToReproduce.push(testData);
|
|
165
166
|
}
|
|
@@ -242,7 +243,7 @@ function reproducedTest(_x3, _x4) {
|
|
|
242
243
|
}
|
|
243
244
|
function _reproducedTest() {
|
|
244
245
|
_reproducedTest = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(args, testsToReproduce) {
|
|
245
|
-
var res, _iterator4, _step4, _args$benchmark2, _test3, r;
|
|
246
|
+
var res, _iterator4, _step4, _args$benchmark2, _args$ciCd2, _test3, r;
|
|
246
247
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
247
248
|
while (1) switch (_context4.prev = _context4.next) {
|
|
248
249
|
case 0:
|
|
@@ -265,7 +266,8 @@ function _reproducedTest() {
|
|
|
265
266
|
report: false,
|
|
266
267
|
verbose: false,
|
|
267
268
|
stopOnTimeout: true,
|
|
268
|
-
reproduce: true
|
|
269
|
+
reproduce: true,
|
|
270
|
+
ciCd: (_args$ciCd2 = args['ci-cd']) !== null && _args$ciCd2 !== void 0 ? _args$ciCd2 : false
|
|
269
271
|
}, 0, testInvocationTimeout);
|
|
270
272
|
case 8:
|
|
271
273
|
r = _context4.sent;
|
package/bin/utils/test-utils.js
CHANGED
|
@@ -664,6 +664,7 @@ function _runWorker() {
|
|
|
664
664
|
return page.evaluate(function (testData, options) {
|
|
665
665
|
if (options.benchmark) window.DG.Test.isInBenchmark = true;
|
|
666
666
|
if (options.reproduce) window.DG.Test.isReproducing = true;
|
|
667
|
+
if (options.ciCd) window.DG.Test.isCiCd = true;
|
|
667
668
|
return new Promise(function (resolve, reject) {
|
|
668
669
|
window.DG.Utils.executeTests(testData, options.stopOnTimeout).then(function (results) {
|
|
669
670
|
resolve(results);
|
package/package.json
CHANGED