hey-api / openapi-ts

✨ Turn your OpenAPI specification into a beautiful TypeScript client
https://heyapi.vercel.app
MIT License
635 stars 44 forks source link

ci: fix e2e tests #683

Closed mrlubos closed 1 week ago

stackblitz[bot] commented 1 week ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

changeset-bot[bot] commented 1 week ago

⚠️ No Changeset found

Latest commit: 15727b3a301ed6048ad2ad1418046504b5bcdea8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hey-api-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 16, 2024 4:12pm
mrlubos commented 1 week ago

@Nick-Lucas fyi

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.65%. Comparing base (9502e80) to head (15727b3). Report is 34 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #683 +/- ## ========================================== - Coverage 75.67% 71.65% -4.03% ========================================== Files 74 76 +2 Lines 7400 7895 +495 Branches 692 696 +4 ========================================== + Hits 5600 5657 +57 - Misses 1797 2235 +438 Partials 3 3 ``` | [Flag](https://app.codecov.io/gh/hey-api/openapi-ts/pull/683/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/hey-api/openapi-ts/pull/683/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api) | `71.65% <ø> (-4.03%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Nick-Lucas commented 1 week ago

Your turn to be on fire today! Weird I didn't see any issues around this in dev, thanks for sorting this out

mrlubos commented 1 week ago

@Nick-Lucas I think this has to do with the e2e setup. Jordan wanted to rework tests completely so this would get caught, we have more issues related to not catching broken types. I'd love to be able to check the generated code too as so many times people report something doesn't build correctly and that would be trivial to test

Nick-Lucas commented 1 week ago

Yeah the snapshot tests are really useful for checking changes to generated code, but I think they could be shifted to run on the uncompiled code to tighten up the dev loop. Build is quite slow

The suite as a whole looks really good but has a few gaps (some of which I filled in)

I did most of my dev using the dryrun suite for this reason

mrlubos commented 1 week ago

@Nick-Lucas mind sharing how did you use dry run? I think we all have different ways of developing/testing, curious what was your process

Nick-Lucas commented 1 week ago

Oh I just added one new test for the transformers in that file (src/index.spec.ts)and disabled the dryrun flag so I could inspect the generated output and place breakpoints. Enabled the flag again before finishing up

It felt pretty productive!

Nick-Lucas commented 1 week ago

I think some committed config for Vitest would help, I never got the vs code extension to work for the repo but the js debug shell is fine

mrlubos commented 1 week ago

Ah yeah, I tend to do something similar to see the output fast. Are you on Discord btw? Are you planning to contribute more stuff?

Nick-Lucas commented 1 week ago

Oh yeah I'm happy to join on discord if you guys have a space there. I'll probably have some more contributions on the transformers based on my experiences at work, and keen to help figure out the instantiable client stuff since my team depends on that 🙂

mrlubos commented 1 week ago

We don't have a group chat at the moment due to lack of stable contributors, we've been just chatting there with Jordan. I am on Discord mrlubos if you want to talk there