-
Notifications
You must be signed in to change notification settings - Fork 156
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
compilerOptions
in jest.globals
not taking effect?
#539
Comments
Potentially a duplicate of #493 |
@mikemklee try this:
Works for me 🙂 |
@rogatty
and
but neither seem to work for me sadly. Do you mind sharing what versions you are using for |
Upon further debugging, I noticed that the function processScriptSetup(descriptor, filePath, config) {
if (!descriptor.scriptSetup) { // <--- this will cause this method to early exit
return null
}
const vueJestConfig = getVueJestConfig(config)
const content = compileScript(descriptor, {
id: filePath,
refTransform: true,
...vueJestConfig.compilerOptions
})
const contentMap = mapLines(descriptor.scriptSetup.map, content.map)
const transformer = resolveTransformer(
descriptor.scriptSetup.lang,
vueJestConfig
)
const result = transformer.process(content.content, filePath, config)
result.map = mapLines(contentMap, result.map)
return result
} I think by which is a new addition in vue 3. For vue 2 components, |
@mikemklee versions I'm using:
I don't use If you use vue-jest/packages/vue3-jest/lib/process.js Line 115 in 89586a0
|
@rogatty is it possible to have the app running with the compat build, while also keeping the tests passing as-is? context:
and we would like to figure out the best path forward that would minimize the amount of friction/changes required |
@mikemklee there is https://www.npmjs.com/package/vue-test-utils-compat but it doesn't support the latest There were some other issues I don't remember, and we've decided it's better to just migrate most of the tests, skip a few of problematic ones for now, and upgrade the app logic where necessary. |
I am trying to set the
compilerOptions.whitespace
topreserve
.Am I setting this in the wrong place? setting it under the
globals
does not seem to do anything.I am using:
The text was updated successfully, but these errors were encountered: