testilo 9.0.0 → 9.0.1
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/merge.js +9 -2
- package/package.json +1 -1
package/merge.js
CHANGED
|
@@ -15,6 +15,7 @@ require('dotenv').config();
|
|
|
15
15
|
// ########## CONSTANTS
|
|
16
16
|
|
|
17
17
|
const stdRequester = process.env.REQUESTER;
|
|
18
|
+
// Tests that alter the page.
|
|
18
19
|
const contaminantNames = new Set([
|
|
19
20
|
'axe',
|
|
20
21
|
'continuum',
|
|
@@ -28,6 +29,10 @@ const contaminantNames = new Set([
|
|
|
28
29
|
'textNodes',
|
|
29
30
|
'wave'
|
|
30
31
|
]);
|
|
32
|
+
// Tests that are immune to page alteration.
|
|
33
|
+
const immuneNames = new Set([
|
|
34
|
+
'tenon'
|
|
35
|
+
]);
|
|
31
36
|
|
|
32
37
|
// ########## FUNCTIONS
|
|
33
38
|
|
|
@@ -61,12 +66,13 @@ exports.merge = (script, batch, requester, isolate = false) => {
|
|
|
61
66
|
protoJob.timeStamp = timeStamp;
|
|
62
67
|
// If isolation was requested:
|
|
63
68
|
if (isolate) {
|
|
64
|
-
//
|
|
69
|
+
// Perform it.
|
|
65
70
|
let {acts} = protoJob;
|
|
66
71
|
let lastPlaceholder = {};
|
|
67
72
|
for (const actIndexString in acts) {
|
|
68
73
|
const actIndex = Number.parseInt(actIndexString);
|
|
69
74
|
const act = acts[actIndex];
|
|
75
|
+
const nextAct = acts[actIndex + 1];
|
|
70
76
|
if (act.type === 'placeholder') {
|
|
71
77
|
lastPlaceholder = act;
|
|
72
78
|
}
|
|
@@ -74,7 +80,8 @@ exports.merge = (script, batch, requester, isolate = false) => {
|
|
|
74
80
|
act.type === 'test'
|
|
75
81
|
&& contaminantNames.has(act.which)
|
|
76
82
|
&& actIndex < acts.length - 1
|
|
77
|
-
&&
|
|
83
|
+
&& nextAct.type !== 'placeholder'
|
|
84
|
+
&& (nextAct.type !== 'test' || ! immuneNames.has(nextAct.which))
|
|
78
85
|
) {
|
|
79
86
|
acts[actIndex] = JSON.parse(JSON.stringify([act, lastPlaceholder]));
|
|
80
87
|
}
|