Skip to content
/ shortest-example Public template

Minimal example on using @anti-work/shortest

License

Notifications You must be signed in to change notification settings

anti-work/shortest-example

Repository files navigation

Shortest example repo

A minimal example showing how to use @anti-work/shortest - an AI-powered natural language end-to-end testing framework.

Note

This is a template repository for reproducing issues. Please do not submit pull requests. For feature requests or questions, use Discussions.

Prerequisites

  • Node.js (v18 or higher)
  • npm

Setup

  1. Click the "Use this template" button above, or use this template directly.

  2. Clone your new repository:

git clone https://github.com/YOUR_USERNAME/shortest-example.git
cd shortest-example
  1. Install dependencies:
npm install
  1. Set up your environment variables:
cp .env.example .env

Then edit .env and replace your_anthropic_api_key_here with your actual Anthropic API key.

  1. Run the example test:
npx shortest

Create a bug report

  1. Modify example.test.ts to reproduce your issue
  2. Run the test:
# Wrapper script around Shortest to log the output to .shortest/debug.log
npm run test:debug

# Or with Shortest arguments
npm run test:debug -- --no-cache
  1. Commit and push your changes:

Important

The .shortest folder contains valuable debugging information and it will be commited to the repository. Please review its contents before sharing to ensure you're not including any sensitive information you don't want to share publicly.

git add .
git commit -m "Add reproduction"
git push
  1. Create a bug report and include your repo URL

License

MIT