Skip to content

Commit 570bea1

Browse files
committed
test: updated structured logging tests to include a number key
1 parent 200f512 commit 570bea1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/__snapshots__/index.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Array [
88

99
exports[`index Test JSON structured logging 2`] = `
1010
Array [
11-
"{\\"level\\":\\"INFO\\",\\"key\\":\\"root\\",\\"keys\\":\\"root\\",\\"date\\":\\"2020-01-01T00:00:00.000Z\\",\\"msg\\":\\"INFO MESSAGE\\",\\"b\\":4}",
11+
"{\\"4\\":4,\\"level\\":\\"INFO\\",\\"key\\":\\"root\\",\\"keys\\":\\"root\\",\\"date\\":\\"2020-01-01T00:00:00.000Z\\",\\"msg\\":\\"INFO MESSAGE\\"}",
1212
]
1313
`;
1414

tests/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ describe('index', () => {
186186
]);
187187
const childLogger = logger.getChild('child');
188188
logger.debug('DEBUG MESSAGE', { a: 3 });
189-
logger.info('INFO MESSAGE', { b: 4 });
189+
logger.info('INFO MESSAGE', { 4: 4 });
190190
logger.warn('WARN MESSAGE', { c: 'abc' });
191191
logger.error('ERROR MESSAGE', { f: () => 'lol' });
192192
childLogger.info('INFO MESSAGE', {

0 commit comments

Comments
 (0)