-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: introduce the new reporter API #7069
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for vitest-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
import type { TestModule } from './reporters/reported-tasks' | ||
import type { TestSpecification } from './spec' | ||
|
||
export class TestRun { |
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.
I can start helping out with this. Did you already have an idea how this should be integrated into the core.ts
and RPC calls?
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.
I wanted to have parsing logic here, and use higher level methods in core
(this.testRun.start(specs)
) and low lever in rpc calls (like onTaskUpdate
)
This is also the place where we call reporter methods related to the test run (onTestRunStart
, but not onWatcherStart
).
The inspiration for method names is https://vshaxe.github.io/vscode-extern/vscode/TestRun.html
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.
I also think that proposed events are not enough, we will probably need to add more
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.
I also added statistics
to the reported tasks, so we can modify them in place
@@ -0,0 +1,3 @@ | |||
# Test Lifecycle | |||
|
|||
<!-- TODO: lifecyle diagram and reporter API --> |
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.
Could we use vitepress-plugin-mermaid
for this? 🤔
https://emersonbottero.github.io/vitepress-plugin-mermaid/guide/styles.html
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.
Maybe when the lifecycle is finalised
if we report suite hooks (
I think now it's better to have a single hook (
Should be |
Description
THIS IS A DRAFT.
The current lifecycle ("run tests" has its own lifecycle):
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.