This issue might be caused if jsdom environment is used which prefers the browser export versions of the packages. Try adding
jsdom
testEnvironmentOptions { customExportConditions: ['.'] ---> an empty string should work as well. }