testilo 12.0.1 → 12.0.3
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/README.md +6 -4
- package/package.json +1 -1
- package/script.js +0 -3
package/README.md
CHANGED
|
@@ -41,12 +41,12 @@ Testilo can, however, make job preparation more efficient in these scenarios:
|
|
|
41
41
|
|
|
42
42
|
### Target lists
|
|
43
43
|
|
|
44
|
-
The simplest version of a list of targets is a _target list_. It is stored as a tab-delimited text file, with one line per target. Each line contains 3 items, with tabs between them:
|
|
44
|
+
The simplest version of a list of targets is a _target list_. It is an array of arrays defining 1 or more targets. It is stored as a tab-delimited text file, with one line per target. Each line contains 3 items, with tabs between them:
|
|
45
45
|
- An ID for the target
|
|
46
46
|
- A description of the target
|
|
47
47
|
- The URL of the target
|
|
48
48
|
|
|
49
|
-
For example, a target list (with “→” representing the Tab character) might be:
|
|
49
|
+
For example, a stored target list (with “→” representing the Tab character) might be:
|
|
50
50
|
|
|
51
51
|
```text
|
|
52
52
|
w3c→World Wide Web Consortium→https://www.w3.org/
|
|
@@ -168,10 +168,12 @@ A module can invoke `batch` in this way:
|
|
|
168
168
|
|
|
169
169
|
```javaScript
|
|
170
170
|
const {batch} = require('testilo/batch');
|
|
171
|
-
const batchObj = batch(listID, what,
|
|
171
|
+
const batchObj = batch(listID, what, targets);
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
-
This invocation references `listID`, `what`, and `
|
|
174
|
+
This invocation references `listID`, `what`, and `targets` variables that the module must have already defined. The `listID` variable is a unique identifier for the target list. the `what` variable describes the target list. The `targets` variable is an array of arrays, with each array containing the 3 items (ID, description, and URL) defining one target.
|
|
175
|
+
|
|
176
|
+
The `batch()` function of the `batch` module generates a batch and returns it as an object. The invoking module can further dispose of the batch as needed.
|
|
175
177
|
|
|
176
178
|
##### By a user
|
|
177
179
|
|
package/package.json
CHANGED
package/script.js
CHANGED
|
@@ -19,14 +19,11 @@ exports.script = (id, issueClasses, ... issueIDs) => {
|
|
|
19
19
|
const neededTools = {};
|
|
20
20
|
// For each specified issue:
|
|
21
21
|
issueIDs.forEach(issueID => {
|
|
22
|
-
console.log(`Processing ${issueID}`);
|
|
23
22
|
// If it exists in the classification:
|
|
24
23
|
const issueData = issueClasses[issueID];
|
|
25
24
|
if (issueData) {
|
|
26
|
-
console.log('It is in the classification');
|
|
27
25
|
// For each tool that tests for the issue:
|
|
28
26
|
const issueToolIDs = Object.keys(issueData.tools);
|
|
29
|
-
console.log(`Tools with tests for it are ${issueToolIDs}`);
|
|
30
27
|
issueToolIDs.forEach(issueToolID => {
|
|
31
28
|
// For each of the tests of the tool for the issue:
|
|
32
29
|
if (! neededTools[issueToolID]) {
|