renovate/lib/logger/__snapshots__/err-serializer.spec.ts.snap

92 lines
2.2 KiB
Text

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`logger/err-serializer expands errors 1`] = `
Object {
"a": 1,
"b": 2,
"message": "some message",
"options": Object {
"headers": Object {
"authorization": "Bearer testtoken",
},
},
"response": Object {
"body": "some response body",
"url": "some/path",
},
}
`;
exports[`logger/err-serializer got handles http error 1`] = `
Array [
Object {
"headers": Object {
"accept": "application/json",
"accept-encoding": "gzip, deflate, br",
"authorization": "Basic OnRva2Vu",
"host": "github.com",
"user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)",
},
"method": "POST",
"url": "https://:token@github.com/api",
},
]
`;
exports[`logger/err-serializer got sanitize http error 1`] = `
Array [
Object {
"headers": Object {
"accept": "application/json",
"accept-encoding": "gzip, deflate, br",
"authorization": "Basic OnRva2Vu",
"host": "github.com",
"user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)",
},
"method": "POST",
"url": "https://:token@github.com/api",
},
]
`;
exports[`logger/err-serializer got sanitize http error 2`] = `
Object {
"code": "ERR_NON_2XX_3XX_RESPONSE",
"message": "Response code 412 (Precondition Failed)",
"name": "HTTPError",
"options": Object {
"headers": Object {
"accept": "application/json",
"accept-encoding": "gzip, deflate, br",
"user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)",
},
"hostType": "any",
"http2": false,
"method": "POST",
"password": "***********",
"url": "https://:**redacted**@github.com/api",
"username": "",
},
"response": Object {
"body": Object {
"err": Object {
"message": "failed",
},
},
"headers": Object {
"content-type": "application/json",
},
"httpVersion": null,
"statusCode": 412,
"statusMessage": "Precondition Failed",
},
}
`;
exports[`logger/err-serializer handles missing fields 1`] = `
Object {
"a": 1,
"body": "some body",
"stack": "foo",
}
`;