Skip to content

Commit 092b270

Browse files
[tests] suppress debug logs in CI environment
Set LOG_LEVEL=ERROR in vitest-setup.js when running in CI to reduce verbose console output while keeping full logging for local development.
1 parent 462abf7 commit 092b270

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ planned for 2026-01-01
2222
- [check_config] refactor: improve error handling (#3927)
2323
- [calendar] test: remove "Recurring event per timezone" test (#3929)
2424
- [calendar] chore: remove `requiresVersion: "2.1.0"` (#3932)
25-
- [tests] migrate from `jest` to `vitest` (#3940)
25+
- [tests] migrate from `jest` to `vitest` (#3940, #3941)
2626

2727
### Fixed
2828

tests/utils/vitest-setup.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
/**
2-
* Vitest setup file for module aliasing
2+
* Vitest setup file for module aliasing and CI logging
33
* This allows require("logger") to work in unit tests
44
*/
55

66
const Module = require("node:module");
77
const path = require("node:path");
88

9+
// Suppress debug/info logs in CI to keep output clean
10+
if (process.env.CI === "true" && !process.env.LOG_LEVEL) {
11+
process.env.LOG_LEVEL = "ERROR";
12+
}
13+
914
// Store the original require
1015
const originalRequire = Module.prototype.require;
1116

0 commit comments

Comments
 (0)