semtest/Reference/Configuration
Reference
Configuration
Complete reference for the semtest config file.
Config file
Semtest looks for a config file by walking up the directory tree from the current working directory. The first file found is used.
Searched in order:
semtest.config.tssemtest.config.jssemtest.config.mjs
defineConfig
Use the defineConfig helper for type-safe configuration:
TSsemtest.config.ts
import { defineConfig } from "@westopp/semtest"; export default defineConfig({ output: "semtest-results/", llm: "claude-code-sonnet-4-6", });
Properties
| Property | Type | Default | Description |
|---|---|---|---|
testMatch | string[] | ["**/*.spec.md", "**/*.test.md"] | Glob patterns for discovering test files |
testPathIgnorePatterns | string[] | ["node_modules", "dist", ".git", "vendor"] | Patterns to exclude from test discovery |
output | string | "semtest-results/" | Path to the report output directory |
llm | string | "claude-code-sonnet-4-6" | Model key specifying the tool and model. Run semtest list for all options. |
timeout | number | 0 | Per-test timeout in milliseconds. 0 means no timeout. |
repeat | number | 1 | Run each test N times |
bail | boolean | number | false | true to stop after the first failure, or a number to stop after N failures |
verbose | boolean | false | Show detailed per-test output |
strict | boolean | false | Exit code 2 on validation issues |
skipValidation | boolean | false | Skip post-run validation entirely |
debug | boolean | false | Log raw LLM output to a debug directory |
timestamp | boolean | false | Generate timestamped copies of the Markdown report |
includePassing | boolean | false | Include passing tests in the Markdown report |
junit | boolean | false | Generate a JUnit XML report |
skipPermissionsIfPossible | boolean | false | Skip tool permission prompts where supported |
CLI precedence
CLI flags override config file values. The config file provides defaults; flags are overrides for individual runs.
bash
# Config says strict: false, but this run uses strict mode semtest run --strict
Full example
TSsemtest.config.ts
import { defineConfig } from "@westopp/semtest"; export default defineConfig({ testMatch: ["**/*.spec.md"], testPathIgnorePatterns: ["node_modules", "dist", ".git", "vendor"], output: "semtest-results/", llm: "claude-code-opus-4-6", timeout: 120000, repeat: 1, bail: false, verbose: false, strict: true, skipValidation: false, debug: false, timestamp: true, includePassing: false, junit: true, skipPermissionsIfPossible: true, });