testilo 13.10.2 → 13.10.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.
Files changed (3) hide show
  1. package/call.js +3 -3
  2. package/package.json +1 -1
  3. package/script.js +4 -4
package/call.js CHANGED
@@ -57,11 +57,11 @@ const callBatch = async (listID, what) => {
57
57
  // Fulfills a script-creation request.
58
58
  const callScript = async (scriptID, classificationID = null, ... issueIDs) => {
59
59
  // Get any issue classification.
60
- const issueClasses = classificationID
61
- ? require(`${functionDir}/score/${classificationID}`).issueClasses
60
+ const issues = classificationID
61
+ ? require(`${functionDir}/score/${classificationID}`).issues
62
62
  : null;
63
63
  // Create a script.
64
- const scriptObj = script(scriptID, issueClasses, ... issueIDs);
64
+ const scriptObj = script(scriptID, issues, ... issueIDs);
65
65
  // Save the script.
66
66
  const scriptJSON = JSON.stringify(scriptObj, null, 2);
67
67
  await fs.writeFile(`${specDir}/scripts/${scriptID}.json`, scriptJSON);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testilo",
3
- "version": "13.10.2",
3
+ "version": "13.10.3",
4
4
  "description": "Prepares and processes Testaro reports",
5
5
  "main": "aim.js",
6
6
  "scripts": {
package/script.js CHANGED
@@ -20,15 +20,15 @@ let toolIDs = [
20
20
  // ########## FUNCTIONS
21
21
 
22
22
  // Creates and returns a script.
23
- exports.script = (id, issueClasses = null, ... issueIDs) => {
23
+ exports.script = (id, issues = null, ... issueIDs) => {
24
24
  // Initialize data on the tools and rules for the specified issues.
25
25
  const neededTools = {};
26
26
  // If an issue classification and any issues were specified:
27
- if (issueClasses && issueIDs.length) {
27
+ if (issues && issueIDs.length) {
28
28
  // For each specified issue:
29
29
  issueIDs.forEach(issueID => {
30
30
  // If it exists in the classification:
31
- const issueData = issueClasses[issueID];
31
+ const issueData = issues[issueID];
32
32
  if (issueData) {
33
33
  // For each tool that tests for the issue:
34
34
  const issueToolIDs = Object.keys(issueData.tools);
@@ -97,7 +97,7 @@ exports.script = (id, issueClasses = null, ... issueIDs) => {
97
97
  which: toolID
98
98
  };
99
99
  // If rules were specified:
100
- if (issueClasses && issueIDs.length) {
100
+ if (issues && issueIDs.length) {
101
101
  // Add a rules property to the act.
102
102
  toolAct.rules = neededTools[toolID];
103
103
  // If the tool is Testaro: