Conversation
| /** | ||
| * @typedef {{slowDuration?: number, golden?: object, new?: object, diff?: string, pixelsDiff?: number}} TestInfo | ||
| * @typedef {import('@web/test-runner').TestSession} TestSession | ||
| */ |
There was a problem hiding this comment.
What's up with the TypeScript stuff? Thus far, we've avoided TS in our stuff to keep things simple.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
GAUD-9495