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

umi-test jsTranformer not exported properly? (TypeError: Jest: a transform must export a process function.) #59

Closed
jwmann opened this issue Jan 22, 2018 · 3 comments

Comments

@jwmann
Copy link

jwmann commented Jan 22, 2018

I get jest-runtime errors

 FAIL  src/components/Authorized/CheckPermissions.test.js
   Test suite failed to run

    TypeError: Jest: a transform must export a `process` function.

      at ScriptTransformer._getTransformer (node_modules/jest-runtime/build/script_transformer.js:152:15)
          at Generator.next (<anonymous>)

This issue doesn't exist in 0.3.0 only in 0.3.1
Please see ant-design/ant-design-pro#776 for more information

@sorrycc
Copy link
Member

sorrycc commented Jan 22, 2018

It seem to be the problem of babel transform, updated babel don't add module.exports = exports ['default']. I have dist-tag the latest tag of umi-test to 0.3.0.

@sorrycc sorrycc closed this as completed Jan 22, 2018
@sorrycc sorrycc reopened this Jan 22, 2018
@jwmann
Copy link
Author

jwmann commented Jan 22, 2018

Oh wow, so that's where that missing module.exports = exports ['default'] is coming from.
Any idea why babel-transform changed this? A bug maybe?

@sorrycc
Copy link
Member

sorrycc commented Jan 22, 2018

Have not find the change yet, will look it again when I have some time.

xierenyuan pushed a commit to xierenyuan/umi that referenced this issue Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants