test: remove stdout and std from test by mocking logger module (#161)

- Same as #143 
- Resolves
https://github.com/stats-organization/github-stats-extended/pull/143#discussion_r3105155487
- Closes #141
This commit is contained in:
Marco Pasqualetti
2026-04-19 09:28:46 +02:00
committed by GitHub
parent d476f8cbe1
commit fc4ee7507b
21 changed files with 450 additions and 262 deletions
-9
View File
@@ -1,9 +0,0 @@
// @ts-check
/**
* Return console instance based on the environment.
*
* @type {Console | {log: () => void, error: () => void}}
*/
const logger = console;
export { logger };
+12
View File
@@ -0,0 +1,12 @@
/**
* Return console instance based on the environment.
*/
const logger: {
log: (...args: Array<unknown>) => void;
error: (...args: Array<unknown>) => void;
} = {
log: console.log,
error: console.error,
};
export { logger };