Skip to content

Add unit tests and refactor for testability #2

Add unit tests and refactor for testability

Add unit tests and refactor for testability #2

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build
run: npm run build
- name: Check for uncommitted changes
run: |
if [ -n "$(git status --porcelain dist/)" ]; then
echo "Error: dist/ has uncommitted changes"
git diff dist/
exit 1
fi