Skip to content

Commit d9dfb5e

Browse files
committed
Get rid of 'runTests' command
1 parent 693da8a commit d9dfb5e

File tree

4 files changed

+10
-19
lines changed

4 files changed

+10
-19
lines changed

docs/get-started/actions/checkLink.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Consider the following test configuration, which checks the validity of `https:/
173173
To run the test, use the following command:
174174

175175
```bash
176-
npx doc-detective runTests -i bad-certificate.json
176+
npx doc-detective -i bad-certificate.json
177177
```
178178

179179
This command executes the test, but it fails, returning the following response:

docs/get-started/create-your-first-test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ To create your first test, follow these steps:
7878
5. In your terminal, enter the following command to run the test:
7979

8080
```bash
81-
npx doc-detective runTests --input homepage-check.spec.json
81+
npx doc-detective --input homepage-check.spec.json
8282
```
8383

8484
By default, Doc Detective scans the current directory for valid tests, but you can specify your test file using the `--input` argument. For more information, see [Run tests](/docs/get-started/sample-tests.md#run-tests).

docs/get-started/sample-tests.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,49 +14,40 @@ npm i
1414

1515
## Run tests
1616

17-
To run your tests, use the `runTests` command:
18-
1917
```bash
20-
npx doc-detective runTests
18+
npx doc-detective
2119
```
2220

2321
By default, Doc Detective scans the current directory for valid tests, but you can specify your test file with the `--input` argument. For example, to run tests in a file named `doc-content-inline-tests.md`, run the following command:
2422

2523
```bash
26-
npx doc-detective runTests --input doc-content-inline-tests.md
24+
npx doc-detective --input doc-content-inline-tests.md
2725
```
2826

2927
To customize your test, file type, and directory options, create a `.doc-detective.json` [config](/docs/references/schemas/config) file. If a `.doc-detective.json` file exists in the directory when you run the comment, Doc Detective loads the config. Otherwise, you can specify a config path with the `--config` argument.
3028

3129
```bash
32-
npx doc-detective runTests --config .doc-detective.json
30+
npx doc-detective --config .doc-detective.json
3331
```
3432

3533
**Note**: All paths are relative to the current working directory, regardless of the config file's location.
3634

3735
You can override config options with command-line arguments. For example, to run tests in a file named `tests.spec.json`, even if that isn't included in your config, run the following command:
3836

3937
```bash
40-
npx doc-detective runTests --config .doc-detective.json --input tests.spec.json
38+
npx doc-detective --config .doc-detective.json --input tests.spec.json
4139
```
4240

43-
### Run remotely hosted tests
41+
<!-- ### Run remotely hosted tests
4442
4543
You can run tests hosted remotely by specifying the URL of the test file with the `--input` argument. For example, to run tests from a file hosted at `https://doc-detective.com/sample.spec.json`, run the following command:
4644
4745
```bash
48-
npx doc-detective runTests --input https://doc-detective.com/sample.spec.json
46+
npx doc-detective --input https://doc-detective.com/sample.spec.json
4947
```
5048
5149
These tests run the same way as local tests, but Doc Detective fetches the test file from the specified URL and stores it in a temporary directory. The URL must be accessible to the machine running the tests.
52-
53-
## Check your test coverage
54-
55-
You can check the test coverage of your documentation source files with the `runCoverage` command, specifying the source file or directory of source files with the `--input` argument. Doc Detective identifies potential areas of test coverage with file-format-specific regex, and supports CommonMark syntax natively. If you want to test coverage of a file with different syntax, update your the `fileTypes` object of your [config](/docs/references/schemas/config) file accordingly.
56-
57-
```bash
58-
npx doc-detective runCoverage --config .doc-detective.json --input doc-content.md
59-
```
50+
-->
6051

6152
## Next steps
6253

docs/get-started/tests/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ To search for American Shorthair kittens,
138138

139139
### Detected tests
140140

141-
Doc Detective can automatically generate tests based on your documentation source files and your `fileTypes` configuration. Detected tests are useful for large, complex test suites that you want to keep in sync with your documentation. Test detection works by setting `runTests.detectSteps` to `true` and defining markup patterns and associated actions in the `fileTypes.markup` array in your [config](/docs/references/schemas/config), which Doc Detective uses to extract steps from your doc source files. You can define multiple test patterns in your config to extract different types of tests from your documentation.
141+
Doc Detective can automatically generate tests based on your documentation source files and your `fileTypes` configuration. Detected tests are useful for large, complex test suites that you want to keep in sync with your documentation. Test detection works by setting `detectSteps` to `true` and defining markup patterns and associated actions in the `fileTypes.markup` array in your [config](/docs/references/schemas/config), which Doc Detective uses to extract steps from your doc source files. You can define multiple test patterns in your config to extract different types of tests from your documentation.
142142

143143
Detected tests are useful for keeping your tests in sync with your documentation. When you update your documentation, Doc Detective automatically updates the tests based on the new content. Detected tests are generated automatically. You can't edit detected tests directly, but you can update your config or documentation source files to change the tests.
144144

0 commit comments

Comments
 (0)