Skip to content

vojvodics/vue3.3.1-jest-reproduction-example

Repository files navigation

Reproduction example for vue bug

Problem

When importing types in component, it fails in jest environment. To reproduce run:

npm run test

You should see an error:

    [@vue/compiler-sfc] No fs option provided to `compileScript` in non-Node environment. File system access is required for resolving imported types.

Solution

See vue3JestHack.js file.

In jest.config.js uncomment the transform option to use vue3JestHack, and run test again. You should see tests passing

About

Reproduction for vue bug

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published