testaro 53.1.1 → 53.1.2
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/package.json +1 -1
- package/procs/doTestAct.js +0 -1
- package/run.js +7 -5
package/package.json
CHANGED
package/procs/doTestAct.js
CHANGED
|
@@ -49,7 +49,6 @@ const actIndex = Number.parseInt(process.argv[2]);
|
|
|
49
49
|
const doTestAct = async () => {
|
|
50
50
|
const tempReportDir = `${__dirname}/../temp`;
|
|
51
51
|
const tempReportPath = `${tempReportDir}/report.json`;
|
|
52
|
-
await fs.mkdir(tempReportDir, {recursive: true});
|
|
53
52
|
// Get the saved report.
|
|
54
53
|
const reportJSON = await fs.readFile(tempReportPath, 'utf8');
|
|
55
54
|
const report = JSON.parse(reportJSON);
|
package/run.js
CHANGED
|
@@ -541,8 +541,10 @@ const doActs = async (report) => {
|
|
|
541
541
|
const {acts} = report;
|
|
542
542
|
// Get the standardization specification.
|
|
543
543
|
const standard = report.standard || 'only';
|
|
544
|
-
const
|
|
545
|
-
|
|
544
|
+
const tempReportDir = 'temp';
|
|
545
|
+
const tempReportPath = `${tempReportDir}/report.json`;
|
|
546
|
+
await fs.mkdir(tempReportDir, {recursive: true});
|
|
547
|
+
// For each act in the report:
|
|
546
548
|
for (const doActsIndex in acts) {
|
|
547
549
|
actIndex = doActsIndex;
|
|
548
550
|
// If the job has not been aborted:
|
|
@@ -626,7 +628,7 @@ const doActs = async (report) => {
|
|
|
626
628
|
act.startTime = startTime;
|
|
627
629
|
// Save the report.
|
|
628
630
|
let reportJSON = JSON.stringify(report);
|
|
629
|
-
await fs.writeFile(
|
|
631
|
+
await fs.writeFile(tempReportPath, reportJSON);
|
|
630
632
|
// Create a process and wait for it to perform the act and add the result to the saved report.
|
|
631
633
|
const actResult = await new Promise(resolve => {
|
|
632
634
|
let closed = false;
|
|
@@ -647,7 +649,7 @@ const doActs = async (report) => {
|
|
|
647
649
|
});
|
|
648
650
|
});
|
|
649
651
|
// Get the revised report.
|
|
650
|
-
reportJSON = await fs.readFile(
|
|
652
|
+
reportJSON = await fs.readFile(tempReportPath, 'utf8');
|
|
651
653
|
report = JSON.parse(reportJSON);
|
|
652
654
|
// Get the revised act.
|
|
653
655
|
act = report.acts[actIndex];
|
|
@@ -1345,7 +1347,7 @@ const doActs = async (report) => {
|
|
|
1345
1347
|
}
|
|
1346
1348
|
console.log('Acts completed');
|
|
1347
1349
|
await browserClose();
|
|
1348
|
-
await fs.rm(
|
|
1350
|
+
await fs.rm(tempReportPath, {force: true});
|
|
1349
1351
|
return report;
|
|
1350
1352
|
};
|
|
1351
1353
|
/*
|