Skip to content
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

Add tests for workers-types that run in CI #2766

Open
Cherry opened this issue Sep 21, 2024 · 1 comment
Open

Add tests for workers-types that run in CI #2766

Cherry opened this issue Sep 21, 2024 · 1 comment
Assignees
Labels
types Related to @cloudflare/workers-types

Comments

@Cherry
Copy link
Contributor

Cherry commented Sep 21, 2024

Over the last year or so, there have been regular regressions or issues with workers-types that would have been caught with some testing and/or better vetting.

workers-types is a huge cornerstone in the Cloudflare Workers development experience, with TypeScript being the recommended language across the docs, npm create cloudflare, etc. It would be really good to see this have a much more first-class experience and release/vetting process.

Examples:

There do appear to be some tests created in https://github.com/cloudflare/workerd/tree/main/types/test, but I'm not sure how often these run, or if they run in CI, or how much coverage they provide? It would be really nice if these ran regularly and perhaps even a diff of types changes were added into PRs so the types output can be analysed quickly and easily.

@Cherry Cherry added the types Related to @cloudflare/workers-types label Sep 21, 2024
@penalosa
Copy link
Collaborator

This is a great callout. The types tests do run in CI, but they're more about testing the type generation logic rather than making sure the published types are what people expect. I think having a snapshot test of the type generation would be a great improvement, so the changes to the published types could be reviewed in PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types Related to @cloudflare/workers-types
Projects
None yet
Development

No branches or pull requests

3 participants