-
Notifications
You must be signed in to change notification settings - Fork 209
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
regression: attempting to construct DurableObjectState
in jest test causes parse error
#184
Comments
Note that the failing test |
Progress! This took forever to track down. Pinning the issue repo's package.json to: "devDependencies": {
// ...
"jest-environment-miniflare": "~2.2.0",
"miniflare": "~2.2.0",
"undici": "~4.12.0",
} Fixes the problem. It seems to be a regression caused by the |
DurableObjectState
in jest test causes parse errorDurableObjectState
in jest test causes parse error
Hey! 👋 Thanks for raising this and apologies for the delayed response. This looks like an issue with |
Stumbled upon the same issue today. Unfortunately, neither |
Hey! 👋 You should be able to use the |
Attempting to construct an instance of
DurableObjectState
inside a jest test in a project using typescript fails with the following error:You can see a minimal reproduction by cloning this "durable-object-state-issue" repo branch (which also has an optional devcontainer)
Note that this repository was created using the "Miniflare Example Project" in the cloudflare docs. At first glance, this might seem like an issue with the example project's setup, however, unless I'm missing something, there shouldn't be any parse errors caused by a published package (in this case the
@miniflare/durable-objects
package).Previously,
I thinkI had success manually constructing an instance ofDurableObjectState
in order to unit test the non-fetch methods of a DurableObject (see #157), however I cannot replicate this anymore.The text was updated successfully, but these errors were encountered: