@abaplint/transpiler 2.10.40 → 2.10.41
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/build/src/unit_test.js +14 -3
- package/package.json +1 -1
package/build/src/unit_test.js
CHANGED
|
@@ -169,24 +169,35 @@ function getData() {
|
|
|
169
169
|
skip: skipThis,
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
|
-
ret += ` ret.push({objectName: "${st.obj.getName()}",
|
|
172
|
+
ret += ` ret.push({objectName: "${st.obj.getName()}",
|
|
173
|
+
localClass: "${st.localClass}",
|
|
174
|
+
methods: ${JSON.stringify(methods)},
|
|
175
|
+
riskLevel: "${st.riskLevel}",
|
|
176
|
+
filename: "${st.filename}"});\n`;
|
|
173
177
|
}
|
|
174
178
|
ret += ` return ret;
|
|
175
179
|
}
|
|
176
180
|
|
|
177
181
|
async function run() {
|
|
182
|
+
const skipCritical = process.argv[2] === "--skip-critical";
|
|
183
|
+
const onlyCritical = process.argv[2] === "--only-critical";
|
|
178
184
|
await initializeABAP();
|
|
179
185
|
for (const st of getData()) {
|
|
180
186
|
const imported = await import(st.filename);
|
|
181
187
|
const localClass = imported[st.localClass];
|
|
182
188
|
if (localClass.class_setup) await localClass.class_setup();
|
|
183
189
|
for (const m of st.methods) {
|
|
190
|
+
const prefix = st.objectName + ": running " + st.localClass + "->" + m.name;
|
|
184
191
|
if (m.skip) {
|
|
185
|
-
console.log(
|
|
192
|
+
console.log(prefix + ", skipped due to configuration");
|
|
193
|
+
} else if (skipCritical && st.riskLevel === "CRITICAL") {
|
|
194
|
+
console.log(prefix + ", skipped due to risk level " + st.riskLevel);
|
|
195
|
+
} else if (onlyCritical && st.riskLevel !== "CRITICAL") {
|
|
196
|
+
console.log(prefix + ", skipped due to risk level " + st.riskLevel);
|
|
186
197
|
} else {
|
|
187
198
|
const test = await (new localClass()).constructor_();
|
|
188
199
|
${callSpecial("setup")}
|
|
189
|
-
console.log(
|
|
200
|
+
console.log(prefix);
|
|
190
201
|
await test.FRIENDS_ACCESS_INSTANCE[m.name]();
|
|
191
202
|
${callSpecial("teardown")}
|
|
192
203
|
}
|