npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

test-endorphin

v1.0.0

Published

This directory simulates a real user project to test the Endorphin AI package from the user's perspective.

Downloads

5

Readme

Endorphin AI User Project Test Environment

This directory simulates a real user project to test the Endorphin AI package from the user's perspective.

🎯 Purpose

Test that:

  • ✅ Package installs correctly from local repository
  • ✅ Test recorder creates files in USER project (not framework)
  • ✅ All CLI commands work from user project perspective
  • ✅ Environment variables are properly inherited
  • ✅ Configuration works as expected

🚀 Quick Start

1. Setup the Environment

./setup-user-project.sh

2. Test the Test Recorder Location

./test-recorder.sh

3. Test Running Tests

./run-test.sh USER-001

4. Use Quick Commands

./quick-commands.sh

📋 Available Scripts

| Script | Purpose | |--------|---------| | setup-user-project.sh | Initialize/reset the user project environment | | test-recorder.sh | Verify test recorder creates files in correct location | | run-test.sh <test-id> | Run a specific test | | quick-commands.sh | Convenient shortcuts for all operations |

🧪 Test Scenarios

Scenario 1: Package Installation

./quick-commands.sh setup
./quick-commands.sh status

Scenario 2: Test Discovery

./quick-commands.sh list

Scenario 3: Test Recording

./quick-commands.sh recorder
# Check that files are created in ./test-recorder/ (not framework)

Scenario 4: Test Execution

./quick-commands.sh run USER-001

Scenario 5: File Location Verification

./quick-commands.sh test-location

📁 Expected Directory Structure

After running tests, you should see:

tmp/test-endorphin/               # User project (THIS directory)
├── .env                          # Environment variables (copied from main repo)
├── endorphin.config.js           # User configuration
├── package.json                  # User project manifest
├── node_modules/
│   └── endorphin-ai/             # Installed package
├── tests/                        # User's test files
│   └── user-basic-test.js
├── test-recorder/                # ✅ Recording artifacts (USER project)
│   └── REC-[timestamp]/
│       ├── test-session.json
│       ├── summary.json
│       └── steps/
└── test-results/                 # Test execution results

../../test-recorder/              # Framework directory
                                  # ✅ Should remain EMPTY

🔍 Verification Points

✅ Success Indicators

  • [ ] Package installs without errors
  • [ ] npx endorphin --version works
  • [ ] npx endorphin list discovers tests
  • [ ] Test recorder creates ./test-recorder/ in USER project
  • [ ] Framework test-recorder/ directory remains empty
  • [ ] Generated tests appear in ./tests/ directory
  • [ ] Environment variables work correctly

❌ Failure Indicators

  • [ ] Package fails to install
  • [ ] CLI commands don't work
  • [ ] Test recorder creates files in framework directory
  • [ ] Missing environment variables
  • [ ] Configuration not loaded properly

🔧 Environment Setup

The setup script automatically:

  1. Creates a fresh npm project
  2. Installs endorphin-ai from local repository
  3. Copies .env from main repo (including OPENAI_API_KEY)
  4. Creates user configuration file
  5. Sets up convenient npm scripts
  6. Creates sample test files

💡 Usage Tips

Quick Commands Examples

# Setup everything
./quick-commands.sh setup

# List all available tests
./quick-commands.sh list

# Run specific test
./quick-commands.sh run USER-001

# Start test recorder
./quick-commands.sh recorder

# Check project status
./quick-commands.sh status

# Clean up generated files
./quick-commands.sh clean

Manual Testing

# Test CLI directly
npx endorphin --version
npx endorphin list
npx endorphin run test USER-001
npx endorphin run test-recorder

# Check file locations
ls -la test-recorder/           # Should have recordings
ls -la ../../test-recorder/     # Should be empty

🐛 Troubleshooting

"Package not found"

# Reinstall from local repository
npm install ../../

"API key not set"

# Check environment variables
cat .env
# Copy from main repo if needed
cp ../../.env .env

"Test recorder files in wrong location"

# Run verification script
./test-recorder.sh

"Tests not discovered"

# Check test format
cat tests/user-basic-test.js
# Verify exports are correct

This test environment ensures that the Endorphin AI package works correctly from a user's perspective and that all files are created in the appropriate locations.