doc-detective 2.9.3-dev.0 → 2.10.1-dev.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.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "doc-detective",
3
- "version": "2.9.3-dev.0",
3
+ "version": "2.10.1-dev.0",
4
4
  "description": "Treat doc content as testable assertions to validate doc accuracy and product UX.",
5
5
  "bin": {
6
- "doc-detective": "node ./src/index.js"
6
+ "doc-detective": "src/index.js"
7
7
  },
8
8
  "main": "./src/index.js",
9
9
  "scripts": {
@@ -31,8 +31,8 @@
31
31
  },
32
32
  "homepage": "https://github.com/doc-detective/doc-detective#readme",
33
33
  "dependencies": {
34
- "doc-detective-common": "^1.13.1",
35
- "doc-detective-core": "^2.9.5",
34
+ "doc-detective-common": "^1.14.0",
35
+ "doc-detective-core": "^2.10.1-dev.0",
36
36
  "prompt-sync": "^4.2.0",
37
37
  "yargs": "^17.7.2"
38
38
  },
@@ -0,0 +1,19 @@
1
+ {
2
+ "id": "cleanup",
3
+ "tests": [
4
+ {
5
+ "steps": [
6
+ {
7
+ "action": "setVariables",
8
+ "path": ".env"
9
+ },
10
+ {
11
+ "action": "runShell",
12
+ "command": "echo",
13
+ "args": ["cleanup"]
14
+ }
15
+ ]
16
+ }
17
+ ]
18
+ }
19
+
@@ -0,0 +1,29 @@
1
+ {
2
+ "id": "setup",
3
+ "tests": [
4
+ {
5
+ "steps": [
6
+ {
7
+ "action": "runShell",
8
+ "command": "echo",
9
+ "args": ["setup"],
10
+ "exitCodes": [0],
11
+ "output": "/.*?/",
12
+ "setVariables": [
13
+ {
14
+ "name": "TEST",
15
+ "regex": ".*"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "action": "runShell",
21
+ "command": "echo",
22
+ "args": ["$TEST"],
23
+ "exitCodes": [0],
24
+ "output": "setup"
25
+ }
26
+ ]
27
+ }
28
+ ]
29
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "id": "setup",
3
+ "tests": [
4
+ {
5
+ "steps": [
6
+ {
7
+ "action": "setVariables",
8
+ "path": ".env"
9
+ },
10
+ {
11
+ "action": "runShell",
12
+ "command": "echo",
13
+ "args": ["setup"]
14
+ }
15
+ ]
16
+ }
17
+ ]
18
+ }
@@ -4,6 +4,8 @@
4
4
  {
5
5
  "id": "Do all the things! - Test",
6
6
  "description": "This test includes nearly every property across all actions.",
7
+ "setup": "test/artifacts/setup.spec.json",
8
+ "cleanup": "test/artifacts/cleanup.spec.json",
7
9
  "steps": [
8
10
  {
9
11
  "action": "setVariables",
@@ -9,7 +9,7 @@ describe("Run tests sucessfully", function () {
9
9
  this.timeout(0);
10
10
  it("All specs pass", async () => {
11
11
  const runTests = await spawnCommand(
12
- `node ./src/index.js runTests -c ${artifactPath}/config.json -i ${artifactPath}/test.spec.json -o ${artifactPath}`
12
+ `node ./src/index.js runTests -c ${artifactPath}/config.json -i ${artifactPath} -o ${artifactPath}`
13
13
  );
14
14
  // Find output file
15
15
  const outputFiles = runTests.stdout.split("See results at ");
@@ -17,6 +17,6 @@ describe("Run tests sucessfully", function () {
17
17
  const result = JSON.parse(
18
18
  fs.readFileSync(outputFile, { encoding: "utf8" })
19
19
  );
20
- assert.equal(result.summary.specs.pass, 1);
20
+ assert.equal(result.summary.specs.pass, 5);
21
21
  });
22
22
  });