Skip to content

Commit ac996c2

Browse files
Update docs for input functionality (#85)
* update-input * Update docs/get-started/sample-tests.md Co-authored-by: Manny Silva <[email protected]> * Update docs/get-started/tests/index.mdx Co-authored-by: Manny Silva <[email protected]> --------- Co-authored-by: Manny Silva <[email protected]>
1 parent 3577f4f commit ac996c2

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/get-started/sample-tests.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ By default, Doc Detective scans the current directory for valid tests, but you c
2424
npx doc-detective --input doc-content-inline-tests.md
2525
```
2626

27+
If you have test files in multiple directories or want to specify multiple files, then enter them separated with commas:
28+
29+
```bash
30+
npx doc-detective --input doc-content-inline-tests.md,/apis/api-tests.md
31+
```
32+
2733
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.
2834

2935
```bash

docs/get-started/tests/index.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,14 @@ npx doc-detective --input https://doc-detective.com/sample.spec.json
581581

582582
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.
583583

584+
### Run tests with multiple files
585+
586+
You can run tests using multiple files in multiple directories. Add as many comma-separated input values as necessary.
587+
588+
```bash
589+
npx doc-detective --input inline-tests.md,https://doc-detective.com/sample.spec.json,./samples/doc-content.md
590+
```
591+
584592
## Read the results
585593

586594
Doc Detective outputs test results to a `testResults-<timestamp>.json` file in your `output` directory. You can also specify your output directory with the `--output` flag:

0 commit comments

Comments
 (0)