suitener-core
v0.1.7
Published
Core library for Suitener: project introspection, test execution, stub generation, and structured JSON results.
Readme
suitener-core
Core library for Suitener: project introspection, test execution, stub generation, and structured JSON results.
Install
bun add suitener-coreQuick use
import { introspect, runTests } from "suitener-core";
const project = await introspect("./path/to/backend");
const result = await runTests(project);
console.log(result.summary);API
import {
defineConfig,
loadConfig,
introspect,
runTests,
generateStubs,
writeResults,
wrap,
} from "suitener-core";defineConfig(config)— typed helper forsuitener.config.tsloadConfig(root)— resolves config/defaultsintrospect(root)— detects project type, files, and test commandrunTests(project)— runs detected suite or falls back to stubsgenerateStubs(project)— force stub generationwriteResults(project, result)— writessuitener-results/run-*.jsonandlatest.jsonwrap(command, options)— runs a passive Suitener check before a dev command
Config example
import { defineConfig } from "suitener-core";
export default defineConfig({
target: "./src",
include: ["**/*.ts"],
exclude: ["**/*.spec.ts"],
});Notes
- Runtime: Bun
- Output mode: existing tests or generated stubs
- JSON reports:
suitener-results/latest.json
License
MIT
