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
Actually, it seems like typescript is not going well with JEST test cases, so what i feel like either JEST need to ignore those files or those packages need to be transpiled to js code which JEST can understand,
you can try this
"transformIgnorePatterns": [ "node_modules/(?!(@microsoft/sp-core-library))" ],
and in tsconfig.json
"allowJs": true,
for more details please check this post
https://github.com/SharePoint/sp-dev-docs/issues/2325#issuecomment-446416878