1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 07:13:32 +00:00

[EC-515] Re-enable node consoleLog.service test (#3448)

This commit is contained in:
Thomas Rittson
2022-09-08 08:02:53 +10:00
committed by GitHub
parent 04c594203c
commit 233c85f7a3
3 changed files with 29 additions and 30 deletions

View File

@@ -0,0 +1,25 @@
const originalConsole = console;
declare let console: any;
export function interceptConsole(interceptions: any): object {
console = {
log: function () {
// eslint-disable-next-line
interceptions.log = arguments;
},
warn: function () {
// eslint-disable-next-line
interceptions.warn = arguments;
},
error: function () {
// eslint-disable-next-line
interceptions.error = arguments;
},
};
return interceptions;
}
export function restoreConsole() {
console = originalConsole;
}