-
Notifications
You must be signed in to change notification settings - Fork 741
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
Further key-value tests and refactorings #189
Conversation
🦋 Changeset detectedLatest commit: 5ad907c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
f998fad
to
e02f0be
Compare
packages/wrangler/package.json
Outdated
@@ -116,5 +120,18 @@ | |||
"setupFilesAfterEnv": [ | |||
"<rootDir>/src/__tests__/jest.setup.ts" | |||
] | |||
}, |
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.
this doesn't seem right, that's why we have esbuild-jest, to strip the types.
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.
Because of this: aelbore/esbuild-jest#57
d04a03c
to
9cd63e6
Compare
9cd63e6
to
5ad907c
Compare
Looking good to me. Read through both commits. I also noticed some improvements to naming conventions which is a nice ergonomic change too. |
sorry for the delay on reviewing this, promise I'll do so tomorrow |
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.
This all looks pretty reasonable. RIP cfetch :(
Well you can rename it back to cfetch if you like 😸 |
See the individual commits for the details.
The refactoring of the cfetch stuff makes it possible to handle "cursors" for when lists come back in chunks.
Note that in order to use the module mocking (i.e.
mock('../cfetch/internal')
) I created an "internal" module that gets mocked. The actual API that downstream callers access is just../cfetch
- but these then wrap the internal one with extra behaviour.Note also that it is not allowed to have any TS type annotations in files that contain the string
ock(
!! This is because theesbuild-jest
plugin runs a Babel transform of files that contain that string, and it cannot handle TS annotations.