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

Its not working in jest with Next.JS #39

Open
Merynek opened this issue Jul 3, 2024 · 1 comment
Open

Its not working in jest with Next.JS #39

Merynek opened this issue Jul 3, 2024 · 1 comment

Comments

@Merynek
Copy link

Merynek commented Jul 3, 2024

I try run jest tests on my next.js project but it doesnt work.

My next.config.js:
image

extending next.js webpack:
image

but it doesnt work, so I tried ts-jest

jest.config.ts
image

But I got error on every solutions:

error:
image

@Obi-Dann
Copy link
Collaborator

Obi-Dann commented Sep 8, 2024

Hey @Merynek, sorry for a late reply

transformToMobxFLow is not defined is a typescript error, you most likely missing the first step from this section to add type definitions

You may need to add a reference to this package's typescript definition file in order to declare the global transformToMobxFlow function:

/// <reference path="node_modules/ts-transform-async-to-mobx-flow/transformToMobxFlow.d.ts" />

It can be added to a global.d.ts file to access transformToMobxFlow in all the project files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants