+ expect(logger.warn.mock.calls.length).toBe(1)
+ expect(logger.error.mock.calls.length).toBe(1)
+ expect(() => {
+ handleFileException('path/to/module.js', FileType.Authorization, error, 'log prefix |', {
+ consoleOut: true
+ })
+ }).toThrow(error)
+ expect(() => {
+ handleFileException('path/to/module.js', FileType.Authorization, error, 'log prefix |', {
+ throwError: false,
+ consoleOut: true
+ })
+ }).not.toThrow()
+ expect(console.warn.mock.calls.length).toBe(1)
+ expect(console.error.mock.calls.length).toBe(1)