I have this excpetion
Jest encountered an unexpected token
This usually means that you are trying to import a file which Jest cannot parse, e.g. it\'s not p
The transformIgnorePatterns
means if the test path matches any of the patterns, it will not be transformed.
Note: DO NOT SPLIT MULTI-LINES.
The jest will ignore all node_modules
via default.
So you must write like this:
"transformIgnorePatterns": [
// all exceptions must be first line
"/node_modules/(?!@microsoft/sp-core-library|sp-dialog|other_libs_need_transform)"
],