-
-
Notifications
You must be signed in to change notification settings - Fork 481
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(#2056)!: support Pinia Colada #2060
base: main
Are you sure you want to change the base?
Conversation
|
type PathParams, | ||
type AsyncResponseResolverReturnType, | ||
} from "msw"; | ||
import { setupServer } from "msw/node"; |
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.
(Informational; nothing to change) Just a note on msw vs standard fetch
mocking—we’ve gone back-and-forth on how to best test the fetch wrappers, and you’ll see a little blend of both in the test suites. Really, the short answer is “use whatever’s easiest.” But for openapi-fetch specifically, we were seeing msw’s really heavy mocking interfere with our performance benchmarks, so we started using less of it.
Though it does cause some delay in testing, it’s not perceptible to make a difference. Our perf benchmarks were the real reason for it.
As long as you’re not mocking any internal part of the library, pretty much anything goes—whether that means mocking fetch
, or mocking Node’s fetch, or even talking to a local Express server, etc. It’s up to you and what makes sense. But since this is Vue-based, soft recommendation to follow what other similar libraries do, so Vue contributors have an easier time contributing to this lib.
packages/openapi-pinia-colada/test/fixtures/openapi-typescript-codegen.min.js
Outdated
Show resolved
Hide resolved
👷 Deploy request for openapi-ts pending review.Visit the deploys page to approve it
|
58e6c96
to
2fdc7fc
Compare
Work in progress.
Work in progress support for Pinia Colada. The build is currently still broken while I figure out a TanStack React Query port.
Changes
Implements #2056.
How to Review
How can a reviewer review your changes? What should be kept in mind for this review?
Checklist
docs/
updated (if necessary)pnpm run update:examples
run (only applicable for openapi-typescript)