@intuitionrobotics/testelot 0.47.24 → 0.47.26
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/core/_base_apis.js +9 -10
- package/core/_base_apis.js.map +1 -1
- package/package.json +1 -1
package/core/_base_apis.js
CHANGED
|
@@ -26,7 +26,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.__log = __log;
|
|
30
|
+
exports.__sleep = __sleep;
|
|
31
|
+
exports.__http = __http;
|
|
32
|
+
exports.__custom = __custom;
|
|
33
|
+
exports.__compareKeys = __compareKeys;
|
|
34
|
+
exports.__scenario = __scenario;
|
|
35
|
+
exports.__throwException = __throwException;
|
|
36
|
+
exports.enableTerminalLogReWrite = enableTerminalLogReWrite;
|
|
37
|
+
exports._executeScenario = _executeScenario;
|
|
30
38
|
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
31
39
|
const index_1 = require("../index");
|
|
32
40
|
const objectHash = require("object-hash");
|
|
@@ -34,29 +42,24 @@ function __log(logMessage, level = ts_common_1.LogLevel.Verbose) {
|
|
|
34
42
|
// @ts-ignore
|
|
35
43
|
return new index_1.Action_Log(logMessage, level);
|
|
36
44
|
}
|
|
37
|
-
exports.__log = __log;
|
|
38
45
|
function __sleep(sleepMs) {
|
|
39
46
|
// @ts-ignore
|
|
40
47
|
return new index_1.Action_Sleep(sleepMs);
|
|
41
48
|
}
|
|
42
|
-
exports.__sleep = __sleep;
|
|
43
49
|
function __http(method) {
|
|
44
50
|
// @ts-ignore
|
|
45
51
|
return new index_1.Action_Http(method);
|
|
46
52
|
}
|
|
47
|
-
exports.__http = __http;
|
|
48
53
|
function __custom(action) {
|
|
49
54
|
// @ts-ignore
|
|
50
55
|
return new index_1.Action_Custom(action);
|
|
51
56
|
}
|
|
52
|
-
exports.__custom = __custom;
|
|
53
57
|
function __compareKeys(key1, key2) {
|
|
54
58
|
return __custom((action) => __awaiter(this, void 0, void 0, function* () {
|
|
55
59
|
if (objectHash(action.get(key1)) !== objectHash(action.get(key2)))
|
|
56
60
|
throw new index_1.TestException(`NON matched values for keys '${key1.key}' !== '${key2.key}'`);
|
|
57
61
|
}));
|
|
58
62
|
}
|
|
59
|
-
exports.__compareKeys = __compareKeys;
|
|
60
63
|
function __scenario(label, reporter) {
|
|
61
64
|
// @ts-ignore
|
|
62
65
|
const scenario = new index_1.Scenario();
|
|
@@ -66,12 +69,10 @@ function __scenario(label, reporter) {
|
|
|
66
69
|
}
|
|
67
70
|
return scenario;
|
|
68
71
|
}
|
|
69
|
-
exports.__scenario = __scenario;
|
|
70
72
|
function __throwException(message) {
|
|
71
73
|
// @ts-ignore
|
|
72
74
|
return new index_1.Action_ThrowException(message);
|
|
73
75
|
}
|
|
74
|
-
exports.__throwException = __throwException;
|
|
75
76
|
function enableTerminalLogReWrite() {
|
|
76
77
|
ts_common_1.BeLogged.rewriteConsole = (lineCount => {
|
|
77
78
|
let rewriteCommand = "";
|
|
@@ -85,7 +86,6 @@ function enableTerminalLogReWrite() {
|
|
|
85
86
|
}
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
|
-
exports.enableTerminalLogReWrite = enableTerminalLogReWrite;
|
|
89
89
|
function _executeScenario(scenario) {
|
|
90
90
|
new Promise(scenario.run)
|
|
91
91
|
.then(() => {
|
|
@@ -96,5 +96,4 @@ function _executeScenario(scenario) {
|
|
|
96
96
|
scenario.logError(reason);
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
exports._executeScenario = _executeScenario;
|
|
100
99
|
//# sourceMappingURL=_base_apis.js.map
|
package/core/_base_apis.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_base_apis.js","sourceRoot":"","sources":["../../src/main/core/_base_apis.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;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