fail-on-console 1.4.2 → 1.4.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.4.3](https://github.com/benquarmby/fail-on-console/compare/v1.4.2...v1.4.3) (2026-09-20)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * add defense for incorrect format argument ([717ee97](https://github.com/benquarmby/fail-on-console/commit/717ee97e815157a411b695e8c16a772f96eb1eec))
9
+
3
10
  ## [1.4.2](https://github.com/benquarmby/fail-on-console/compare/v1.4.1...v1.4.2) (2026-08-22)
4
11
 
5
12
 
package/index.js CHANGED
@@ -119,6 +119,10 @@ function setupConsole({
119
119
  throw new Error("fail-on-console: beforeEach and afterEach hooks must be provided.");
120
120
  }
121
121
 
122
+ if (typeof format !== "function") {
123
+ throw new Error("fail-on-console: A custom formatter must be a function.");
124
+ }
125
+
122
126
  assertSupportedMethods(methods);
123
127
  assertSupportedStreams(streams);
124
128
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fail-on-console",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Fail Vitest or Jest tests when unexpected console logs, warnings or errors occur.",
5
5
  "keywords": [
6
6
  "jest",
@@ -20,15 +20,14 @@
20
20
  ],
21
21
  "devDependencies": {
22
22
  "@commitlint/config-conventional": "^21.2.2",
23
- "@vitest/coverage-v8": "4.1.11",
23
+ "@vitest/coverage-v8": "^5.0.1",
24
24
  "commitlint": "^21.2.2",
25
- "jest": "^30.4.2",
25
+ "jest": "^30.5.2",
26
26
  "npm-run-all2": "^9.0.3",
27
27
  "prettier": "^3.9.6",
28
28
  "prettier-plugin-packagejson": "^3.0.2",
29
29
  "typescript": "^7.0.2",
30
- "vitest": "^4.1.11",
31
- "node": "runtime:24.19.0"
30
+ "vitest": "^5.0.1"
32
31
  },
33
32
  "devEngines": {
34
33
  "runtime": {