This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
NEVER release, publish, or attempt to release this package. Do not:
- Run
npm publishorrelease-it - Modify version numbers in package.json for release purposes
- Amend or modify release commits
- Create release tags
- Hand-edit
CHANGELOG.md— it is generated entirely by release-it (lerna-changelog) from merged PR titles. Never add headings, sections, or entries to it, not even an "Unreleased" section.
The maintainer handles all releases manually.
bintastic is a test harness for Node.js CLI tools. It creates temporary directories with fixture files, spawns CLI binaries as subprocesses, and captures their output for assertion.
npm test # Run lint + tests
npm run test:vitest # Run tests only
npm run lint # ESLint + Prettier check + markdown-code check
npm run build # Build CJS and ESM with tsup
npm run docs:dev # Generate API reference + run the VitePress dev server
npm run docs:build # Generate API reference + build the docs site
npm run format # Format all files with PrettierRun a single test:
npx vitest run -t "test name pattern"The library exports two main pieces:
-
createBintastic(options)- Factory function that returns test helpers:setupProject()- Creates a temp directory with aBintasticProjectteardownProject()- Cleans up the temp directoryrunBin(...args)- Executes the configured CLI binary viaexecaNoderunBinDebug(...args)- Same asrunBinbut with Node inspector enabled
-
BintasticProject- Extendsfixturify-project'sProjectclass. Provides:filesproperty for defining fixture fileswrite()to persist files to the temp directorygitInit()to initialize a git repochdir()/dispose()for directory management
- execa v9 - Subprocess execution. Uses
execaNodefor running Node scripts withnodeOptionsfor inspector flags. - fixturify-project - Temp directory and fixture file management.
Set BINTASTIC_DEBUG=attach or BINTASTIC_DEBUG=break to enable Node inspector and preserve fixture directories after test runs.