This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 },
3232 "dependencies" : {
3333 "@types/express" : " ^4.16.0" ,
34- "@types/pino" : " ^5.8.10 " ,
34+ "@types/pino" : " ^5.15.3 " ,
3535 "lodash.foreach" : " ^4.5.0" ,
3636 "lodash.isempty" : " ^4.4.0" ,
3737 "lodash.isobject" : " ^3.0.2" ,
4040 "on-finished" : " ^2.3.0" ,
4141 "on-headers" : " ^1.0.1" ,
4242 "pick-deep" : " ^1.0.0" ,
43- "pino" : " ^5.13.2 " ,
43+ "pino" : " ^5.16.0 " ,
4444 "pino-multi-stream" : " ^4.2.0"
4545 },
4646 "peerDependencies" : {
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ const defaultLogger = (options: CosmasOptions & { loggerName?: string } = {}): C
9292 base : { } ,
9393 level : defaultLevel ,
9494 serializers : serializers . serializers ,
95- timestamp : false ,
95+ timestamp : pino . stdTimeFunctions . isoTime ,
9696 customLevels : {
9797 warning : levels . warn ,
9898 } ,
Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ describe('sentry mocked', () => {
6363 } ) ;
6464
6565 test ( 'sentry captureMessage is called with correct scope (respects sentry level)' , async ( ) => {
66+ const dateNow = Date . now ;
67+ Date . now = jest . fn ( ( ) => 1520343036000 ) ;
6668 await new Promise ( ( resolve , reject ) => {
6769 const logger = loggerFactory ( {
6870 sentry : 'DSN' ,
@@ -91,12 +93,14 @@ describe('sentry mocked', () => {
9193 "extras": Object {
9294 "level": 60,
9395 "message": "fatal",
96+ "time": "2018-03-06T13:30:36.000Z",
9497 "v": 1,
9598 },
9699 "level": "critical",
97100 },
98101 }
99102 ` ) ;
103+ Date . now = dateNow ;
100104 } ) ;
101105
102106 test ( 'sentry captureException with stack and correct levels' , async ( ) => {
You can’t perform that action at this time.
0 commit comments