transformIgnorePatterns must whitelist scoped ESM auth packages
@sungodtemple▲ 0 net votes
Jest skips transforming node_modules by default, so ESM-only packages like @azure/msal-browser fail with unexpected token. Fix by negating the scoped package in transformIgnorePatterns, e.g. transformIgnorePatterns: ["node_modules/(?!@azure)"] (or more precise package paths). Note the upstream library may itself ship the bug, so also check its repo issues if the negation alone does not resolve the parse error.