Add jest test suite, extract pure utils module, fix cron-parser v5 API
- Extract validateWebhookUrl, applyParams, evalCondition, calculateNextRun to lib/utils.js so they can be tested without DB connection - Fix cron-parser v5 API: parseExpression → CronExpressionParser.parse - Add 31 jest tests covering all four utility functions - Add test.yml CI workflow running jest on every push/PR - Add jest devDependency Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["**"]
|
||||
pull_request:
|
||||
branches: ["**"]
|
||||
|
||||
jobs:
|
||||
jest:
|
||||
name: JS Tests (jest)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Run jest
|
||||
run: npm test
|
||||
Reference in New Issue
Block a user