docs: Document test detection enhancements and source location tracking#23
docs: Document test detection enhancements and source location tracking#23promptless[bot] wants to merge 1 commit intomainfrom
Conversation
| --- | ||
|
|
||
| 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](/reference/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. | ||
| 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 is enabled by default (`detectSteps: true`) and uses markup patterns and associated actions defined in the `fileTypes.markup` array in your [config](/reference/schemas/config) 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. |
There was a problem hiding this comment.
Citation: Updated to clarify detectSteps defaults to true. Based on change in src/common/src/detectTests.ts where config.detectSteps ?? true now defaults to true when not specified.
View source
|
|
||
| Combine detected tests with [inline tests](./inline-tests) for comprehensive test coverage with minimal manual effort. | ||
|
|
||
| ## Source location tracking |
There was a problem hiding this comment.
Citation: New section documenting the location property added to detected steps. Based on changes in src/common/src/detectTests.ts that add _startIndex, _endIndex, and _line tracking, plus new schema properties in output schemas.
View source
| outputs | object(Outputs (step)) | Optional. Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence. | ``{}`` | ||
| variables | object(Variables (step)) | Optional. Environment variables to set from user-defined expressions. | ``{}`` | ||
| breakpoint | boolean | Optional. Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled. | `false` | ||
| location | object([Source Location](/reference/schemas/source-location)) | ReadOnly. Source location where this step was detected in the original file. This is system-populated metadata for [detected tests](/docs/tests/detected) and should not be set manually. | |
There was a problem hiding this comment.
Citation: Added location field to step schema. Based on new location object added in step_v3.schema.json with line, startIndex, and endIndex properties.
View source
| - `schemas`: All JSON schemas for validation | ||
| - `validate()`: Validate objects against Doc Detective schemas | ||
| - `detectTests()`: Detect tests from documentation content | ||
| - `defaultFileTypes`: Default file type definitions for Markdown, HTML, AsciiDoc, and DITA |
There was a problem hiding this comment.
Citation: Documented defaultFileTypes export. Based on new src/common/src/fileTypes.ts module that exports defaultFileTypes and FileType, plus updates to src/common/src/index.ts exports.
View source
Open this suggestion in Promptless to view citations and reasoning process
Updates documentation to reflect PR #197 changes: clarifies that
detectStepsis now enabled by default, documents the newlocationproperty on detected steps for source file tracking, and expands thedoc-detective-commonpackage documentation with its public exports includingdefaultFileTypesandFileType.Trigger Events
doc-detective/doc-detective PR #197: Refactor test detection and enhance file type handling
Promptless Research (9 files, 1 GitHub PR)
.long_term_context/product_knowledge/product_overview.md.long_term_context/doc_workflow/client_instructions.md.long_term_context/style/client_style_guide.mdfern/pages/docs/tests/detected.mdxfern/pages/docs/input-formats/overview.mdxfern/pages/reference/schemas/config.mdfern/pages/contribute/repos/doc-detective-common.mdfern/pages/reference/schemas/common.mdfern/docs.ymlAgent Response
Tip: Connect Jira, Linear, Confluence, and more in Integrations to enrich suggestion quality 🔗