File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ var ignored = new Set(
10
10
'showProperties' ,
11
11
'showStack' ,
12
12
'domain' ,
13
+ 'domainEmitter' ,
13
14
'domainThrown' ,
14
15
] )
15
16
) ;
Original file line number Diff line number Diff line change @@ -252,6 +252,19 @@ describe('PluginError()', function () {
252
252
done ( ) ;
253
253
} ) ;
254
254
255
+ it ( 'should not show additional properties added by a domain' , function ( done ) {
256
+ var Duplex = require ( 'stream' ) . Duplex ;
257
+ var stream = new Duplex ( { objectMode : true } ) ;
258
+ var domain = require ( 'domain' ) . create ( ) ;
259
+ domain . add ( stream ) ;
260
+ domain . on ( 'error' , function ( err ) {
261
+ expect ( err ) . toBeInstanceOf ( PluginError ) ;
262
+ expect ( err . toString ( ) ) . not . toContain ( 'domain' ) ;
263
+ done ( ) ;
264
+ } ) ;
265
+ stream . emit ( 'error' , new PluginError ( 'plugin' , 'message' ) ) ;
266
+ } ) ;
267
+
255
268
it ( 'should not modify error argument' , function ( done ) {
256
269
var realErr = { message : 'something broke' } ;
257
270
new PluginError ( 'test' , realErr ) ;
You can’t perform that action at this time.
0 commit comments