@@ -8,18 +8,16 @@ if (!common.isMainThread)
8
8
common . skip ( 'process.chdir is not available in Workers' ) ;
9
9
10
10
const 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);
23
21
` ;
24
22
const FILE_NAME = 'node_trace.1.log' ;
25
23
@@ -29,6 +27,7 @@ process.chdir(tmpdir.path);
29
27
30
28
const proc = cp . spawn ( process . execPath ,
31
29
[ '--trace-event-categories' , 'custom' ,
30
+ '--expose-internals' ,
32
31
'-e' , CODE ] ) ;
33
32
34
33
proc . once ( 'exit' , common . mustCall ( ( ) => {
0 commit comments