feat: add CI test workflow and commands tests (#147)
Testing infrastructure improvements: 1. Add GitHub Actions workflow (.github/workflows/test.yml) - Runs on push/PR to main - Installs deps, builds, runs tests - Blocks merging broken code 2. Add tests for commands.ts (src/core/commands.test.ts) - Tests parseCommand() with valid/invalid inputs - Tests case insensitivity - Tests COMMANDS array and HELP_TEXT Now at 231 tests across 17 test files. Written by Cameron ◯ Letta Code "Test early, test often." - Software proverb
This commit is contained in:
27
.github/workflows/test.yml
vendored
Normal file
27
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Run tests
|
||||
run: npm run test:run
|
||||
Reference in New Issue
Block a user