Last eslint tweak (#18198)

* Should be there now

* Format
This commit is contained in:
Rijk van Zanten
2023-04-14 17:40:50 -04:00
committed by GitHub
parent 37658802b7
commit c48309ab68
293 changed files with 1627 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ vi.mock('./env', async () => {
LOG_LEVEL: 'info',
LOG_STYLE: 'raw',
};
return {
default: MOCK_ENV,
getEnv: () => MOCK_ENV,
@@ -41,6 +42,7 @@ afterEach(() => {
describe('req.headers.authorization', () => {
test('Should redact bearer token in Authorization header', () => {
const instance = pino(httpLoggerOptions, stream);
instance.info({
req: {
headers: {
@@ -48,6 +50,7 @@ describe('req.headers.authorization', () => {
},
},
});
expect(logOutput.mock.calls[0][0]).toMatchObject({
req: {
headers: {
@@ -61,6 +64,7 @@ describe('req.headers.authorization', () => {
describe('req.headers.cookie', () => {
test('Should redact refresh token when there is only one entry', () => {
const instance = pino(httpLoggerOptions, stream);
instance.info({
req: {
headers: {
@@ -68,6 +72,7 @@ describe('req.headers.cookie', () => {
},
},
});
expect(logOutput.mock.calls[0][0]).toMatchObject({
req: {
headers: {
@@ -79,6 +84,7 @@ describe('req.headers.cookie', () => {
test('Should redact refresh token with multiple entries', () => {
const instance = pino(httpLoggerOptions, stream);
instance.info({
req: {
headers: {
@@ -86,6 +92,7 @@ describe('req.headers.cookie', () => {
},
},
});
expect(logOutput.mock.calls[0][0]).toMatchObject({
req: {
headers: {
@@ -99,6 +106,7 @@ describe('req.headers.cookie', () => {
describe('res.headers', () => {
test('Should redact refresh token when there is only one entry', () => {
const instance = pino(httpLoggerOptions, stream);
instance.info({
res: {
headers: {
@@ -106,6 +114,7 @@ describe('res.headers', () => {
},
},
});
expect(logOutput.mock.calls[0][0]).toMatchObject({
res: {
headers: {
@@ -117,6 +126,7 @@ describe('res.headers', () => {
test('Should redact refresh token with multiple entries', () => {
const instance = pino(httpLoggerOptions, stream);
instance.info({
res: {
headers: {
@@ -129,6 +139,7 @@ describe('res.headers', () => {
},
},
});
expect(logOutput.mock.calls[0][0]).toMatchObject({
res: {
headers: {