You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If something is a node_module, I would personally always use the above approach. If it is your own transformer or jest plugin, I think adding them to tools is a good solution (and that's really cool).
It looks like there are issues using
<rooDir>
in paths inside thejest.config.js
.I had to do the following in the root
jest.config.js
to get it working:rootDir
references from ourtransformIgnorePatterns
(see How to set transformIgnorePatterns to fix "Jest encountered an unexpected token" #812)transform
references to usepath.resolve
and re-addsnapshotSerializers
'sass-to-ts.scss': '<rootDir>/tools/sass-extract-preprocessor.js',
'sass-to-ts.scss': path.resolve(__dirname, 'tools/sass-extract-preprocessor.js'),
snapshotSerializers
fromjest-preset-angular
withoutrootDir
:@FrozenPandaz Is there a better way to handle this?
The text was updated successfully, but these errors were encountered: