doc-detective 2.9.0-dev.2 → 2.9.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.
@@ -1,18 +1,18 @@
1
- const { spawnCommand } = require("../src/utils");
2
- const assert = require("assert").strict;
3
- const path = require("path");
4
- const artifactPath = path.resolve("./test/artifacts");
5
-
6
- describe("Perform coverage analysis successfully", function () {
7
- // Set indefinite timeout
8
- this.timeout(0);
9
- it("Should have 6 covered and 0 uncovered", async () => {
10
- const coverateResults = await spawnCommand(`node ./src/index.js runCoverage -c ${artifactPath}/config.json -i ${artifactPath}/doc-content.md -o ${artifactPath}`);
11
- // Find output file
12
- const outputFiles = coverateResults.stdout.split("See results at ");
13
- const outputFile = outputFiles[outputFiles.length - 1].trim();
14
- const result = require(outputFile);
15
- assert.equal(result.summary.covered, 6);
16
- assert.equal(result.summary.uncovered, 0);
17
- });
18
- });
1
+ const { spawnCommand } = require("../src/utils");
2
+ const assert = require("assert").strict;
3
+ const path = require("path");
4
+ const artifactPath = path.resolve("./test/artifacts");
5
+
6
+ describe("Perform coverage analysis successfully", function () {
7
+ // Set indefinite timeout
8
+ this.timeout(0);
9
+ it("Should have 6 covered and 0 uncovered", async () => {
10
+ const coverateResults = await spawnCommand(`node ./src/index.js runCoverage -c ${artifactPath}/config.json -i ${artifactPath}/doc-content.md -o ${artifactPath}`);
11
+ // Find output file
12
+ const outputFiles = coverateResults.stdout.split("See results at ");
13
+ const outputFile = outputFiles[outputFiles.length - 1].trim();
14
+ const result = require(outputFile);
15
+ assert.equal(result.summary.covered, 6);
16
+ assert.equal(result.summary.uncovered, 0);
17
+ });
18
+ });
@@ -1,22 +1,22 @@
1
- const { spawnCommand } = require("../src/utils");
2
- const assert = require("assert").strict;
3
- const fs = require("fs");
4
- const path = require("path");
5
- const artifactPath = path.resolve("./test/artifacts");
6
-
7
- describe("Run tests sucessfully", function () {
8
- // Set indefinite timeout
9
- this.timeout(0);
10
- it("All specs pass", async () => {
11
- const runTests = await spawnCommand(
12
- `node ./src/index.js runTests -c ${artifactPath}/config.json -i ${artifactPath}/test.spec.json -o ${artifactPath}`
13
- );
14
- // Find output file
15
- const outputFiles = runTests.stdout.split("See results at ");
16
- const outputFile = outputFiles[outputFiles.length - 1].trim();
17
- const result = JSON.parse(
18
- fs.readFileSync(outputFile, { encoding: "utf8" })
19
- );
20
- assert.equal(result.summary.specs.pass, 1);
21
- });
22
- });
1
+ const { spawnCommand } = require("../src/utils");
2
+ const assert = require("assert").strict;
3
+ const fs = require("fs");
4
+ const path = require("path");
5
+ const artifactPath = path.resolve("./test/artifacts");
6
+
7
+ describe("Run tests sucessfully", function () {
8
+ // Set indefinite timeout
9
+ this.timeout(0);
10
+ it("All specs pass", async () => {
11
+ const runTests = await spawnCommand(
12
+ `node ./src/index.js runTests -c ${artifactPath}/config.json -i ${artifactPath}/test.spec.json -o ${artifactPath}`
13
+ );
14
+ // Find output file
15
+ const outputFiles = runTests.stdout.split("See results at ");
16
+ const outputFile = outputFiles[outputFiles.length - 1].trim();
17
+ const result = JSON.parse(
18
+ fs.readFileSync(outputFile, { encoding: "utf8" })
19
+ );
20
+ assert.equal(result.summary.specs.pass, 1);
21
+ });
22
+ });
@@ -1,10 +1,10 @@
1
- {
2
- "input": ".",
3
- "output": ".",
4
- "logLevel": "silent",
5
- "recursive": true,
6
- "runTests": {
7
- "setup": ".",
8
- "cleanup": "."
9
- }
1
+ {
2
+ "input": ".",
3
+ "output": ".",
4
+ "logLevel": "silent",
5
+ "recursive": true,
6
+ "runTests": {
7
+ "setup": ".",
8
+ "cleanup": "."
9
+ }
10
10
  }
@@ -1,125 +1,125 @@
1
- {
2
- "summary": {
3
- "specs": {
4
- "pass": 1,
5
- "fail": 0,
6
- "warning": 0,
7
- "skipped": 0
8
- },
9
- "tests": {
10
- "pass": 1,
11
- "fail": 0,
12
- "warning": 0,
13
- "skipped": 0
14
- },
15
- "contexts": {
16
- "pass": 1,
17
- "fail": 0,
18
- "warning": 0,
19
- "skipped": 0
20
- },
21
- "steps": {
22
- "pass": 6,
23
- "fail": 0,
24
- "warning": 0,
25
- "skipped": 0
26
- }
27
- },
28
- "specs": [
29
- {
30
- "result": "PASS",
31
- "id": "Do all the things! - Spec",
32
- "tests": [
33
- {
34
- "result": "PASS",
35
- "id": "Do all the things! - Test",
36
- "contexts": [
37
- {
38
- "result": "PASS",
39
- "app": "firefox",
40
- "platform": "linux",
41
- "steps": [
42
- {
43
- "result": "PASS",
44
- "resultDescription": "Set variables.",
45
- "action": "setVariables",
46
- "path": ".env",
47
- "id": "2606bcf3-2f45-4c4d-82a1-61392f5e8917"
48
- },
49
- {
50
- "result": "PASS",
51
- "resultDescription": "Executed command.",
52
- "action": "runShell",
53
- "command": "echo",
54
- "args": [
55
- "hawkeyexl"
56
- ],
57
- "id": "a15d25e8-6fa3-49c5-be3d-ae5aca0715e5"
58
- },
59
- {
60
- "result": "PASS",
61
- "resultDescription": "Returned 200",
62
- "action": "checkLink",
63
- "url": "https://www.duckduckgo.com",
64
- "id": "a4c44478-9756-4227-a63b-aa2d49aa4511",
65
- "statusCodes": [
66
- 200
67
- ]
68
- },
69
- {
70
- "result": "PASS",
71
- "resultDescription": "Returned 201. Expected response data was present in actual response data.",
72
- "action": "httpRequest",
73
- "url": "https://reqres.in/api/users",
74
- "method": "post",
75
- "requestData": {
76
- "name": "morpheus",
77
- "job": "leader"
78
- },
79
- "responseData": {
80
- "name": "morpheus",
81
- "job": "leader"
82
- },
83
- "statusCodes": [
84
- 200,
85
- 201
86
- ],
87
- "id": "fd520fd4-f32f-428b-a072-c2b2cffe3a3c",
88
- "requestHeaders": {},
89
- "responseHeaders": {},
90
- "requestParams": {},
91
- "responseParams": {},
92
- "envsFromResponseData": []
93
- },
94
- {
95
- "result": "PASS",
96
- "resultDescription": "Opened URL.",
97
- "action": "goTo",
98
- "url": "https://www.google.com",
99
- "id": "d6b47d3d-42db-45a7-8fde-3633adf30411"
100
- },
101
- {
102
- "result": "PASS",
103
- "resultDescription": "Found an element matching selector. Moved to element. Clicked element. Typed keys.",
104
- "action": "find",
105
- "selector": "[title=Search]",
106
- "timeout": 10000,
107
- "moveTo": true,
108
- "click": true,
109
- "typeKeys": {
110
- "keys": [
111
- "shorthair cat",
112
- "$ENTER$"
113
- ]
114
- },
115
- "id": "0d631a5b-6e96-4031-8d04-52d270f6e251"
116
- }
117
- ]
118
- }
119
- ],
120
- "description": "This test includes nearly every property across all actions."
121
- }
122
- ]
123
- }
124
- ]
1
+ {
2
+ "summary": {
3
+ "specs": {
4
+ "pass": 1,
5
+ "fail": 0,
6
+ "warning": 0,
7
+ "skipped": 0
8
+ },
9
+ "tests": {
10
+ "pass": 1,
11
+ "fail": 0,
12
+ "warning": 0,
13
+ "skipped": 0
14
+ },
15
+ "contexts": {
16
+ "pass": 1,
17
+ "fail": 0,
18
+ "warning": 0,
19
+ "skipped": 0
20
+ },
21
+ "steps": {
22
+ "pass": 6,
23
+ "fail": 0,
24
+ "warning": 0,
25
+ "skipped": 0
26
+ }
27
+ },
28
+ "specs": [
29
+ {
30
+ "result": "PASS",
31
+ "id": "Do all the things! - Spec",
32
+ "tests": [
33
+ {
34
+ "result": "PASS",
35
+ "id": "Do all the things! - Test",
36
+ "contexts": [
37
+ {
38
+ "result": "PASS",
39
+ "app": "firefox",
40
+ "platform": "linux",
41
+ "steps": [
42
+ {
43
+ "result": "PASS",
44
+ "resultDescription": "Set variables.",
45
+ "action": "setVariables",
46
+ "path": ".env",
47
+ "id": "2606bcf3-2f45-4c4d-82a1-61392f5e8917"
48
+ },
49
+ {
50
+ "result": "PASS",
51
+ "resultDescription": "Executed command.",
52
+ "action": "runShell",
53
+ "command": "echo",
54
+ "args": [
55
+ "hawkeyexl"
56
+ ],
57
+ "id": "a15d25e8-6fa3-49c5-be3d-ae5aca0715e5"
58
+ },
59
+ {
60
+ "result": "PASS",
61
+ "resultDescription": "Returned 200",
62
+ "action": "checkLink",
63
+ "url": "https://www.duckduckgo.com",
64
+ "id": "a4c44478-9756-4227-a63b-aa2d49aa4511",
65
+ "statusCodes": [
66
+ 200
67
+ ]
68
+ },
69
+ {
70
+ "result": "PASS",
71
+ "resultDescription": "Returned 201. Expected response data was present in actual response data.",
72
+ "action": "httpRequest",
73
+ "url": "https://reqres.in/api/users",
74
+ "method": "post",
75
+ "requestData": {
76
+ "name": "morpheus",
77
+ "job": "leader"
78
+ },
79
+ "responseData": {
80
+ "name": "morpheus",
81
+ "job": "leader"
82
+ },
83
+ "statusCodes": [
84
+ 200,
85
+ 201
86
+ ],
87
+ "id": "fd520fd4-f32f-428b-a072-c2b2cffe3a3c",
88
+ "requestHeaders": {},
89
+ "responseHeaders": {},
90
+ "requestParams": {},
91
+ "responseParams": {},
92
+ "envsFromResponseData": []
93
+ },
94
+ {
95
+ "result": "PASS",
96
+ "resultDescription": "Opened URL.",
97
+ "action": "goTo",
98
+ "url": "https://www.google.com",
99
+ "id": "d6b47d3d-42db-45a7-8fde-3633adf30411"
100
+ },
101
+ {
102
+ "result": "PASS",
103
+ "resultDescription": "Found an element matching selector. Moved to element. Clicked element. Typed keys.",
104
+ "action": "find",
105
+ "selector": "[title=Search]",
106
+ "timeout": 10000,
107
+ "moveTo": true,
108
+ "click": true,
109
+ "typeKeys": {
110
+ "keys": [
111
+ "shorthair cat",
112
+ "$ENTER$"
113
+ ]
114
+ },
115
+ "id": "0d631a5b-6e96-4031-8d04-52d270f6e251"
116
+ }
117
+ ]
118
+ }
119
+ ],
120
+ "description": "This test includes nearly every property across all actions."
121
+ }
122
+ ]
123
+ }
124
+ ]
125
125
  }