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

Jest is broken since v0.10.2 #139

Open
dm4t2 opened this issue May 23, 2022 · 3 comments
Open

Jest is broken since v0.10.2 #139

dm4t2 opened this issue May 23, 2022 · 3 comments

Comments

@dm4t2
Copy link
Contributor

dm4t2 commented May 23, 2022

I'm using a custom Jest transformer for usage with the Ref Sugar syntax:

const { raw } = require('unplugin-vue2-script-setup').default
const transform = raw({ reactivityTransform: true }).transform

module.exports = {
  process(source, filename, ...args) {
    const transformed = transform(source, filename)
    const code = transformed ? transformed.code : source
    return require('@vue/vue2-jest').process.call(this, code, filename, ...args)
  }
}

However, this no longer works when updating from v0.10.1 to v.0.10.2, even with await transform(...).

@antfu
Copy link
Member

antfu commented May 23, 2022

Can you share a minimal reproduction? Thanks.

@dm4t2
Copy link
Contributor Author

dm4t2 commented May 23, 2022

@antfu
Copy link
Member

antfu commented May 26, 2022

You might need to use async processAsync hook instead of process. But it involved another issue of Jest jestjs/jest#11458

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