Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
fix(error-reporting): custom console object depth (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
infoxicator authored Dec 1, 2020
1 parent 6abc973 commit 9e66064
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions __tests__/errorReporting.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ describe('error reporting', () => {

return store.dispatch(sendErrorReport())
.then((data) => {
expect(consoleErrorSpy).toHaveBeenCalledWith(util.inspect(queue, false, null, true));
expect(consoleErrorSpy).toHaveBeenCalledWith(util.inspect(queue, false, 10, true));
expect(store.getActions().length).toBe(2);
expect(store.getActions()[0].type).toEqual(SEND_ERROR_REPORT_REQUEST);
expect(store.getActions()[1].type).toEqual(SEND_ERROR_REPORT_SUCCESS);
Expand Down Expand Up @@ -450,7 +450,7 @@ describe('error reporting', () => {
expect.assertions(1);
const err = new Error('this is a test');
return serverSideError(err).then(() => {
expect(consoleErrorSpy).toHaveBeenCalledWith(util.inspect(err, false, null, true));
expect(consoleErrorSpy).toHaveBeenCalledWith(util.inspect(err, false, 10, true));
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/errorReporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function getPendingPromise(state) {
export function serverSideError(error) {
// nodejs console truncates output by default
// https://nodejs.org/api/util.html#util_util_inspect_object_options
console.error(util.inspect(error, false, null, true));
console.error(util.inspect(error, false, 10, true));
return Promise.resolve({ thankYou: true });
}

Expand Down

0 comments on commit 9e66064

Please sign in to comment.