Bitwarden client applications (web, browser extension, desktop, and cli)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
359 B

const originalConsole = console;
declare let console: any;
export function interceptConsole(): {
log: jest.Mock<any, any>;
warn: jest.Mock<any, any>;
error: jest.Mock<any, any>;
} {
console = {
log: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
};
return console;
}
export function restoreConsole() {
console = originalConsole;
}