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:

  1. semtest.config.ts
  2. semtest.config.js
  3. semtest.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

PropertyTypeDefaultDescription
testMatchstring[]["**/*.spec.md", "**/*.test.md"]Glob patterns for discovering test files
testPathIgnorePatternsstring[]["node_modules", "dist", ".git", "vendor"]Patterns to exclude from test discovery
outputstring"semtest-results/"Path to the report output directory
llmstring"claude-code-sonnet-4-6"Model key specifying the tool and model. Run semtest list for all options.
timeoutnumber0Per-test timeout in milliseconds. 0 means no timeout.
repeatnumber1Run each test N times
bailboolean | numberfalsetrue to stop after the first failure, or a number to stop after N failures
verbosebooleanfalseShow detailed per-test output
strictbooleanfalseExit code 2 on validation issues
skipValidationbooleanfalseSkip post-run validation entirely
debugbooleanfalseLog raw LLM output to a debug directory
timestampbooleanfalseGenerate timestamped copies of the Markdown report
includePassingbooleanfalseInclude passing tests in the Markdown report
junitbooleanfalseGenerate a JUnit XML report
skipPermissionsIfPossiblebooleanfalseSkip 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,
});