kaelum 1.4.0 โ 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/core/errorHandler.js +1 -1
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -208,6 +208,18 @@ It will return standardized JSON for errors and log server-side errors (5xx) to
|
|
|
208
208
|
|
|
209
209
|
---
|
|
210
210
|
|
|
211
|
+
## ๐งช Running Tests
|
|
212
|
+
|
|
213
|
+
Kaelum includes a unit test suite using **Jest**. To run the tests:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
npm test
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
This checks core functionality including `setConfig`, routes, and error handlers.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
211
223
|
## ๐ง Local development & contributing
|
|
212
224
|
|
|
213
225
|
```bash
|
package/core/errorHandler.js
CHANGED
|
@@ -85,7 +85,7 @@ function errorHandlerFactory(options = {}) {
|
|
|
85
85
|
if (typeof logger === "function") {
|
|
86
86
|
// allow custom logger to receive (err, req, { status })
|
|
87
87
|
logger(normalizedErr, req, { status });
|
|
88
|
-
} else {
|
|
88
|
+
} else if (logger !== false) {
|
|
89
89
|
defaultLog(normalizedErr, req);
|
|
90
90
|
}
|
|
91
91
|
} catch (logErr) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kaelum",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "A minimalist Node.js framework for building web pages and APIs with simplicity and speed.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"kaelum": "cli/index.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"test": "
|
|
13
|
+
"test": "jest --verbose"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"framework",
|
|
@@ -34,5 +34,9 @@
|
|
|
34
34
|
"helmet": "^7.2.0",
|
|
35
35
|
"inquirer": "^12.6.0",
|
|
36
36
|
"morgan": "^1.10.1"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"jest": "^30.2.0",
|
|
40
|
+
"supertest": "^7.2.2"
|
|
37
41
|
}
|
|
38
42
|
}
|