Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions test/parallel/test-trace-events-api.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,7 +31,7 @@ const isChild = process.argv[2] === 'child'
constenabledCategories=getEnabledCategoriesFromCommandLine();

assert.strictEqual(getEnabledCategories(),enabledCategories);
[1,'foo',true,false,null,undefined].forEach((i)=>{
for(constiof[1,'foo',true,false,null,undefined]){
assert.throws(()=>createTracing(i),{
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError'
Expand All@@ -40,7 +40,7 @@ assert.strictEqual(getEnabledCategories(), enabledCategories);
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError'
});
});
}

assert.throws(
()=>createTracing({categories: []}),
Expand DownExpand Up@@ -156,8 +156,7 @@ function testApiInChildProcess(execArgs, cb){
assert.strictEqual(
traces.length,
expectedBegins.length+expectedEnds.length);

traces.forEach((trace)=>{
for(consttraceoftraces){
assert.strictEqual(trace.pid,proc.pid);
switch(trace.ph){
case'b': {
Expand All@@ -175,7 +174,7 @@ function testApiInChildProcess(execArgs, cb){
default:
assert.fail('Unexpected trace event phase');
}
});
}
process.chdir(parentDir);
cb&&process.nextTick(cb);
}));
Expand Down