testilo 24.0.0 → 24.1.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/script.js +18 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testilo",
3
- "version": "24.0.0",
3
+ "version": "24.1.0",
4
4
  "description": "Prepares and processes Testaro reports",
5
5
  "main": "aim.js",
6
6
  "scripts": {
package/script.js CHANGED
@@ -90,8 +90,24 @@ exports.script = (id, issues = null, ... issueIDs) => {
90
90
  if (issues && issueIDs.length) {
91
91
  // Add a rules array as a property to the act.
92
92
  toolAct.rules = neededTools[toolID];
93
- // If the tool is Testaro:
94
- if (toolID === 'testaro') {
93
+ // If the tool is QualWeb:
94
+ if (toolID === 'qualWeb') {
95
+ // For each QualWeb module:
96
+ const specs = [];
97
+ const prefixes = {
98
+ act: 'QW-ACT-',
99
+ wcag: 'QW-WCAG-',
100
+ bp: 'QW-BP'
101
+ };
102
+ Object.keys(prefixes).forEach(prefix => {
103
+ // Specify the rules of that module to be tested for.
104
+ const ids = toolAct.rules.filter(id => id.startsWith(prefixes[prefix]));
105
+ const integers = ids.map(id => id.slice(prefixes[prefix].length));
106
+ specs.push(`${prefix}:${integers.join(',')}`);
107
+ });
108
+ }
109
+ // Otherwise, if the tool is Testaro:
110
+ else if (toolID === 'testaro') {
95
111
  // Prepend the inclusion option to the rule array.
96
112
  toolAct.rules.unshift('y');
97
113
  }