We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70fcfaf commit 75b6269Copy full SHA for 75b6269
utils/utils/src/__tests__/logger.test.ts
@@ -53,6 +53,16 @@ describe('deleteProps', () => {
53
expect(log.cause.$response).toBeUndefined();
54
});
55
56
+ test('can strip a $response field from an object in an array', () => {
57
+ const log = {
58
+ level: 'error',
59
+ message: 'err',
60
+ errors: [{ $response: {} }],
61
+ };
62
+ deleteProps(log);
63
+ expect(log.errors[0].$response).toBeUndefined();
64
+ });
65
+
66
test('does not remove nested $response field from log object when its more than 2 levels deep', () => {
67
const log = {
68
level: 'error',
0 commit comments