Skip to content

fix: refactor to prepare for alt tests#904

Open
GZolla wants to merge 2 commits intomainfrom
gzolla/refactor-vdiff-plugin
Open

fix: refactor to prepare for alt tests#904
GZolla wants to merge 2 commits intomainfrom
gzolla/refactor-vdiff-plugin

Conversation

@GZolla
Copy link
Contributor

@GZolla GZolla commented Feb 18, 2026

@GZolla GZolla requested a review from a team as a code owner February 18, 2026 20:17
/**
* @typedef {{slowDuration?: number, golden?: object, new?: object, diff?: string, pixelsDiff?: number}} TestInfo
* @typedef {import('@web/test-runner').TestSession} TestSession
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's up with the TypeScript stuff? Thus far, we've avoided TS in our stuff to keep things simple.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was debating whether to include these comments on the final commit. I find it helpful to improve intellisense, specially for object structures that we expect but don't enforce through JS(e.g. TestInfo and TestPayload). For those cases it also helps to centralize documentation too, we can know what info we record for a test without inferring it from all the calls to TestInfoManager.set.
I've personally found that jsdoc comments are more helpful than cumbersome on node applications, but are definitely more of a burden for anything browser side(e.g. core). I saw when working on the fixture method that we added jsdoc comments there so I went with precedent, but I can remove it if our position is against TS comments.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With fixture it was a public-facing API so the pain-to-maintain vs. reward-for-consumers was a bit more worth it I think. This stuff seems like it's all internal to the testing library though ya?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants