I have a JavaScript file (Angular, but I don;t think that’s anything to do with it).
console.log works fine, but console.error throws * TypeError: Cannot find function error in object [object Object].
console.log('An error occurred while searching. Status code was ' + status);
console.error('An error occurred while searching. Status code was ' + status);
I’m running test using Jasmine, maybe Jasmine mocks\injects it’s own console??
UPDATE
This is being run via a mvn build with Jasmine, so no browser.
Problem was that the no-op implementation of console we default to didn’t have a stubbed error method.
e.g: