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:
+3
-2
@@ -3,7 +3,7 @@
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "jest"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
@@ -18,6 +18,7 @@
|
||||
"ws": "^8.18.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.57.1"
|
||||
"eslint": "^8.57.1",
|
||||
"jest": "^29.7.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user