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:
@@ -1,9 +0,0 @@
|
||||
// @ts-check
|
||||
/**
|
||||
* Return console instance based on the environment.
|
||||
*
|
||||
* @type {Console | {log: () => void, error: () => void}}
|
||||
*/
|
||||
const logger = console;
|
||||
|
||||
export { logger };
|
||||
@@ -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 };
|
||||
Reference in New Issue
Block a user