Phase 1: Add ESLint/Prettier config + baseline auto-fixes
This commit is contained in:
@@ -12,7 +12,7 @@ describe('logger-utils', () => {
|
||||
username: 'admin',
|
||||
password: 'secret123',
|
||||
apiKey: 'abc-def-ghi',
|
||||
token: 'xyz123'
|
||||
token: 'xyz123',
|
||||
};
|
||||
|
||||
const result = sanitizeForLog(input);
|
||||
@@ -29,9 +29,9 @@ describe('logger-utils', () => {
|
||||
name: 'Alice',
|
||||
credentials: {
|
||||
password: 'secret',
|
||||
token: 'abc123'
|
||||
}
|
||||
}
|
||||
token: 'abc123',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const result = sanitizeForLog(input);
|
||||
@@ -44,7 +44,7 @@ describe('logger-utils', () => {
|
||||
test('should handle arrays', () => {
|
||||
const input = [
|
||||
{ name: 'user1', password: 'pass1' },
|
||||
{ name: 'user2', secret: 'pass2' }
|
||||
{ name: 'user2', secret: 'pass2' },
|
||||
];
|
||||
|
||||
const result = sanitizeForLog(input);
|
||||
@@ -63,7 +63,7 @@ describe('logger-utils', () => {
|
||||
test('should support additional sensitive keys', () => {
|
||||
const input = {
|
||||
email: 'user@example.com',
|
||||
ssn: '123-45-6789'
|
||||
ssn: '123-45-6789',
|
||||
};
|
||||
|
||||
const result = sanitizeForLog(input, ['ssn']);
|
||||
@@ -76,7 +76,7 @@ describe('logger-utils', () => {
|
||||
const input = {
|
||||
PASSWORD: 'secret',
|
||||
ApiKey: 'key123',
|
||||
Bearer_Token: 'token456'
|
||||
Bearer_Token: 'token456',
|
||||
};
|
||||
|
||||
const result = sanitizeForLog(input);
|
||||
@@ -125,7 +125,7 @@ describe('logger-utils', () => {
|
||||
test('should create safe log object with message and sanitized data', () => {
|
||||
const result = safeLog('User login', {
|
||||
username: 'alice',
|
||||
password: 'secret123'
|
||||
password: 'secret123',
|
||||
});
|
||||
|
||||
expect(result).toHaveProperty('message', 'User login');
|
||||
|
||||
Reference in New Issue
Block a user