@test-station/adapter-shell
v0.2.17
Published
Generic shell-command adapter for Test Station.
Readme
@test-station/adapter-shell
Generic shell-command adapter for Test Station.
Most consumers should install @test-station/cli or @test-station/core instead of this package directly. The default core bundle already includes the shell adapter. Install this package only when you are composing adapters yourself around @test-station/core.
Install
npm install --save-dev @test-station/adapter-shellWhat It Does
- runs arbitrary command-backed suites
- synthesizes normalized results from exit status and shell output
- supports the
single-check-json-v1result format for structured single-check suites - writes raw shell logs under
raw/
Structured Single-Check JSON
Use resultFormat: 'single-check-json-v1' when the command prints a single JSON object to stdout and you want that payload normalized as one structured check.
{
adapter: 'shell',
command: [process.execPath, './scripts/check-mappings.mjs'],
resultFormat: 'single-check-json-v1',
resultFormatOptions: {
name: 'Mapping parity',
assertions: [
'Compare local mappings against the upstream reference list.',
],
module: 'transpiler',
theme: 'analysis',
warningFields: [
{ field: 'missingFromLocal', label: 'mappings missing locally', mode: 'count-array' },
],
rawDetailsFields: ['referenceCount', 'localCount', 'missingFromLocal', 'localOnly'],
},
}The adapter stores the JSON payload as a raw artifact, maps configured warning fields into human-readable warnings, and surfaces the selected fields under test.rawDetails.
Direct Use
import { createShellAdapter } from '@test-station/adapter-shell';
const adapter = createShellAdapter();Use adapter id shell in test-station.config.mjs.
