File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
packages/dd-trace/test/debugger/devtools_client Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -498,6 +498,38 @@ describe('snapshot-pruner', function () {
498498 } )
499499 } )
500500
501+ it ( 'should prune objects inside Map entries (arrays of arrays)' , function ( ) {
502+ assertPrunedSnapshot ( - 1 , {
503+ myMap : {
504+ type : 'map' ,
505+ entries : [
506+ [
507+ { type : 'string' , value : 'key1' } ,
508+ { type : 'string' , value : 'x' . repeat ( 500 ) } // Should be pruned
509+ ] ,
510+ [
511+ { type : 'string' , value : 'key2' } ,
512+ { type : 'string' , value : 'small' }
513+ ]
514+ ]
515+ }
516+ } , {
517+ myMap : {
518+ type : 'map' ,
519+ entries : [
520+ [
521+ { type : 'string' , value : 'key1' } ,
522+ { pruned : true }
523+ ] ,
524+ [
525+ { type : 'string' , value : 'key2' } ,
526+ { type : 'string' , value : 'small' }
527+ ]
528+ ]
529+ }
530+ } )
531+ } )
532+
501533 /**
502534 * Assert that the pruneSnapshot function successfully prunes the snapshot and returns the expected locals.
503535 * @param {number } maxSize - Used to define the max allowed size of the snapshot. If positive, it's the absolute max
You can’t perform that action at this time.
0 commit comments