@midscene/test 1.17.3 → 1.17.4
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/dist/es/test-cli.mjs +10 -8
- package/dist/es/test-cli.mjs.map +1 -1
- package/dist/lib/test-cli.js +14 -12
- package/dist/lib/test-cli.js.map +1 -1
- package/package.json +13 -13
package/dist/lib/test-cli.js
CHANGED
|
@@ -29,7 +29,7 @@ var __webpack_modules__ = {
|
|
|
29
29
|
},
|
|
30
30
|
"./package.json" (module) {
|
|
31
31
|
module.exports = {
|
|
32
|
-
rE: "1.17.
|
|
32
|
+
rE: "1.17.4"
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
};
|
|
@@ -92,10 +92,12 @@ var __webpack_exports__ = {};
|
|
|
92
92
|
(()=>{
|
|
93
93
|
var external_node_fs_ = __webpack_require__("node:fs");
|
|
94
94
|
var external_node_path_ = __webpack_require__("node:path");
|
|
95
|
-
const test_runner_namespaceObject = require("@midscene/core/internal/test-runner");
|
|
96
|
-
const logger_namespaceObject = require("@midscene/shared/logger");
|
|
97
|
-
var package_0 = __webpack_require__("./package.json");
|
|
98
95
|
const external_node_util_namespaceObject = require("node:util");
|
|
96
|
+
var external_chalk_ = __webpack_require__("chalk");
|
|
97
|
+
var external_chalk_default = /*#__PURE__*/ __webpack_require__.n(external_chalk_);
|
|
98
|
+
const external_string_width_namespaceObject = require("string-width");
|
|
99
|
+
var external_string_width_default = /*#__PURE__*/ __webpack_require__.n(external_string_width_namespaceObject);
|
|
100
|
+
var package_0 = __webpack_require__("./package.json");
|
|
99
101
|
const formatCliError = (error)=>'string' == typeof error ? error : (0, external_node_util_namespaceObject.inspect)(error, {
|
|
100
102
|
colors: false,
|
|
101
103
|
depth: null,
|
|
@@ -123,11 +125,8 @@ var __webpack_exports__ = {};
|
|
|
123
125
|
if (!messages.length) return current instanceof Error ? current.message : formatCliError(current);
|
|
124
126
|
return messages.join('\nCaused by: ');
|
|
125
127
|
}
|
|
126
|
-
var external_chalk_ = __webpack_require__("chalk");
|
|
127
|
-
var external_chalk_default = /*#__PURE__*/ __webpack_require__.n(external_chalk_);
|
|
128
|
-
const external_string_width_namespaceObject = require("string-width");
|
|
129
|
-
var external_string_width_default = /*#__PURE__*/ __webpack_require__.n(external_string_width_namespaceObject);
|
|
130
128
|
const external_node_url_namespaceObject = require("node:url");
|
|
129
|
+
const test_runner_namespaceObject = require("@midscene/core/internal/test-runner");
|
|
131
130
|
const oneLine = (value)=>(0, external_node_util_namespaceObject.stripVTControlCharacters)(value).replace(/\s+/g, ' ').trim();
|
|
132
131
|
const shorten = (value, length)=>{
|
|
133
132
|
const text = oneLine(value);
|
|
@@ -1116,6 +1115,7 @@ var __webpack_exports__ = {};
|
|
|
1116
1115
|
].join('\n');
|
|
1117
1116
|
(0, external_node_fs_.appendFileSync)(output, `${summary}\n`);
|
|
1118
1117
|
}
|
|
1118
|
+
const logger_namespaceObject = require("@midscene/shared/logger");
|
|
1119
1119
|
const v4_namespaceObject = require("zod/v4");
|
|
1120
1120
|
const GENERATED_COMMENT = '<!-- Generated by `midscene-test nodes`. Do not edit directly. -->';
|
|
1121
1121
|
const sortNodesForSpec = (nodes)=>{
|
|
@@ -3667,10 +3667,9 @@ Legacy tasks/flow YAML and its CLI options belong to the midscene command.
|
|
|
3667
3667
|
io.log(`Summary: ${result.summaryPath}`);
|
|
3668
3668
|
if (result.markdownPath && 'verbose' === reporter.mode) io.log(`Markdown: ${result.markdownPath}`);
|
|
3669
3669
|
if (result.reportPath) io.log(`Report: ${result.reportPath}`);
|
|
3670
|
-
writeGitHubSummary(result);
|
|
3671
3670
|
return result.exitCode;
|
|
3672
3671
|
};
|
|
3673
|
-
async function runTestCli(args, io = defaultCliIO) {
|
|
3672
|
+
async function runTestCli(args, io = defaultCliIO, onResult) {
|
|
3674
3673
|
try {
|
|
3675
3674
|
if ('model' === args[0]) {
|
|
3676
3675
|
const { runModelCommand } = await __webpack_require__.e("703").then(__webpack_require__.bind(__webpack_require__, "./src/cli/model-command.ts"));
|
|
@@ -3712,9 +3711,12 @@ Legacy tasks/flow YAML and its CLI options belong to the midscene command.
|
|
|
3712
3711
|
} catch (error) {
|
|
3713
3712
|
if (!(error instanceof test_runner_namespaceObject.WorkflowExecutionFailure)) throw error;
|
|
3714
3713
|
reportTestProjectResult(error.result, io, reporter, projectRoot, error.errors);
|
|
3714
|
+
onResult?.(error.result);
|
|
3715
3715
|
return 1;
|
|
3716
3716
|
}
|
|
3717
|
-
|
|
3717
|
+
const exitCode = reportTestProjectResult(result, io, reporter, projectRoot);
|
|
3718
|
+
onResult?.(result);
|
|
3719
|
+
return exitCode;
|
|
3718
3720
|
});
|
|
3719
3721
|
} finally{
|
|
3720
3722
|
try {
|
|
@@ -3728,7 +3730,7 @@ Legacy tasks/flow YAML and its CLI options belong to the midscene command.
|
|
|
3728
3730
|
return 1;
|
|
3729
3731
|
}
|
|
3730
3732
|
}
|
|
3731
|
-
runTestCli(process.argv.slice(2)).then((exitCode)=>{
|
|
3733
|
+
runTestCli(process.argv.slice(2), void 0, writeGitHubSummary).then((exitCode)=>{
|
|
3732
3734
|
process.exitCode = exitCode;
|
|
3733
3735
|
});
|
|
3734
3736
|
})();
|