-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_runner: emit start event when subtest starts #47797
Changes from 7 commits
a24f544
7158d9d
a500692
b2e8085
f4e13b5
d4b38f6
9033855
f7dbe8a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,6 +189,7 @@ class Test extends AsyncResource { | |
this.nesting = 0; | ||
this.only = testOnlyFlag; | ||
this.reporter = new TestsStream(); | ||
// this.reporter.lifecycleRun(this.nesting, kFilename, this.testNumber, this.name, 'starting', 'starting'); | ||
this.runOnlySubtests = this.only; | ||
this.testNumber = 0; | ||
this.timeout = kDefaultTimeout; | ||
|
@@ -478,7 +479,7 @@ class Test extends AsyncResource { | |
this.parent.addPendingSubtest(deferred); | ||
return deferred.promise; | ||
} | ||
|
||
this.reporter.lifecycleRun(this.nesting, kFilename, this.testNumber, this.name, 'starting', 'starting'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be emitted before the if |
||
return this.run(); | ||
} | ||
|
||
|
@@ -782,6 +783,8 @@ class Suite extends Test { | |
} | ||
|
||
async run() { | ||
// this.reporter.lifecycleRun(this.nesting, kFilename, this.testNumber, this.name, 'starting', 'starting'); | ||
|
||
const hookArgs = this.getRunArgs(); | ||
|
||
try { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,10 @@ class TestsStream extends Readable { | |
} | ||
} | ||
|
||
lifecycleRun(nesting, file, testNumber, name, details) { | ||
this[kEmitMessage]('test:lifecycle:run', { __proto__: null, name, nesting, file, testNumber, details }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't feel too strongly, but I wouldn't say "enqueue" just rolls off the tongue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, but in terms of distinction from |
||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can remove ...directive I guess |
||
|
||
fail(nesting, file, testNumber, name, details, directive) { | ||
this[kEmitMessage]('test:fail', { __proto__: null, name, nesting, file, testNumber, details, ...directive }); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will remove comments in next commit if CI passes.