Skip to content

Commit be52bba

Browse files
committed
update-input
1 parent bf228b5 commit be52bba

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
@@ -563,6 +563,14 @@ npx doc-detective --input https://doc-detective.com/sample.spec.json
563563

564564
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.
565565

566+
### Run tests with multiple files
567+
568+
You can run tests using multiple files in multiple directories. Add as many comma-separated input values as necessary.
569+
570+
```bash
571+
npx doc-detective --input inline-tests.md, https://doc-detective.com/sample.spec.json, ./samples/doc-content.md
572+
```
573+
566574
## Read the results
567575

568576
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)