@@ -8,18 +8,16 @@ if (!common.isMainThread)
88 common . skip ( 'process.chdir is not available in Workers' ) ;
99
1010const CODE = `
11- process.binding("trace_events").emit(
12- 'b'.charCodeAt(0), 'custom',
13- 'type-value', 10, 'extra-value', 20);
14- process.binding("trace_events").emit(
15- 'b'.charCodeAt(0), 'custom',
16- 'type-value', 20, 'first-value', 20, 'second-value', 30);
17- process.binding("trace_events").emit(
18- 'b'.charCodeAt(0), 'custom',
19- 'type-value', 30);
20- process.binding("trace_events").emit(
21- 'b'.charCodeAt(0), 'missing',
22- 'type-value', 10, 'extra-value', 20);
11+ const { internalBinding } = require('internal/test/binding');
12+ const { emit } = internalBinding('trace_events');
13+ emit('b'.charCodeAt(0), 'custom',
14+ 'type-value', 10, 'extra-value', 20);
15+ emit('b'.charCodeAt(0), 'custom',
16+ 'type-value', 20, 'first-value', 20, 'second-value', 30);
17+ emit('b'.charCodeAt(0), 'custom',
18+ 'type-value', 30);
19+ emit('b'.charCodeAt(0), 'missing',
20+ 'type-value', 10, 'extra-value', 20);
2321` ;
2422const FILE_NAME = 'node_trace.1.log' ;
2523
@@ -29,6 +27,7 @@ process.chdir(tmpdir.path);
2927
3028const proc = cp . spawn ( process . execPath ,
3129 [ '--trace-event-categories' , 'custom' ,
30+ '--expose-internals' ,
3231 '-e' , CODE ] ) ;
3332
3433proc . once ( 'exit' , common . mustCall ( ( ) => {
0 commit comments