test

star 0

Run tests for the Ghostfolio project - smart detection of affected projects, specific test files, or full suite

TheSpiciestDev By TheSpiciestDev schedule Updated 2/23/2026

name: test description: Run tests for the Ghostfolio project - smart detection of affected projects, specific test files, or full suite disable-model-invocation: true allowed-tools: Bash, Read, Grep, Glob argument-hint: "[all|api|client|common|ui|affected|]"

Ghostfolio Smart Test Runner

Run tests intelligently based on what changed or what's specified.

Project Context

  • Test framework: Jest 30.2.0 with ts-jest
  • Monorepo: NX workspace with 4 projects (api, client, common, ui)
  • 30 spec files across the workspace
  • Tests load .env.example via dotenv-cli (no running DB/Redis needed)

Commands

Based on $ARGUMENTS:

No argument or affected

Run tests only for NX projects affected by current changes:

cd /home/james-allen/Projects/ghostfolio && npx nx affected --target=test --base=main --head=HEAD --parallel=4

If no changes detected, report that and suggest running all.

all

Run the full test suite:

cd /home/james-allen/Projects/ghostfolio && npm test

api

Run API (backend) tests only:

cd /home/james-allen/Projects/ghostfolio && npm run test:api

client

Run Angular client tests:

cd /home/james-allen/Projects/ghostfolio && npx nx test client

common

Run shared library tests:

cd /home/james-allen/Projects/ghostfolio && npm run test:common

ui

Run UI library tests:

cd /home/james-allen/Projects/ghostfolio && npm run test:ui

File pattern (anything else)

Find and run matching spec files:

  1. Use Glob to find **/*$ARGUMENTS*.spec.ts files
  2. If exactly one match, run it directly:
    cd /home/james-allen/Projects/ghostfolio && npx jest --config apps/api/jest.config.ts --testPathPattern="<matched-file>"
    
  3. If multiple matches, show them and ask which to run

On Failure

When tests fail:

  1. Read the failing test file
  2. Read the source file under test
  3. Analyze the failure message
  4. Suggest a fix with specific code changes
  5. Offer to apply the fix

Test File Locations

  • API portfolio calculator tests: apps/api/src/app/portfolio/calculator/roai/*.spec.ts (21 files)
  • API other tests: apps/api/src/app/**/*.spec.ts
  • Common lib tests: libs/common/src/lib/**/*.spec.ts
  • UI lib tests: libs/ui/src/lib/**/*.spec.ts
Install via CLI
npx skills add https://github.com/TheSpiciestDev/ghostfolio-agent --skill test
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator
TheSpiciestDev
TheSpiciestDev Explore all skills →