Closed erincarignan closed 2 years ago
Does ng test
work for the project after the upgrade?
As I can see from your diagnostic report is it not Wallaby-specific issue, looks like you use intl
package the uses node.js' global
which is not available in browsers. It works with previous version of Angular CLI because they use Webpack 4 which has Automatic Node.js Polyfills
, Angular CLI 13 uses Webpack 5 that does not support the feature.
You may consider replace or fork intl
because apparently the project is not maintained anymore.
Intl.js is no longer actively maintained, due to other commitments from the original author and maintainers. Please fork if you wish to make improvements.
As an intermediate solution you may add your own polyfill for global
window.global = globalThis;
and import it before intl
++import './global.js';
import 'intl';
Issue description or question
After upgrading our project to Angular 13, Wallaby now gives an error in the output window (below). Tests do run successfully using ng test.
ReferenceError: .\node_modules\intl\index.js : global is not defined at Object.window.moduleBundler.modules. (http://localhost:58533/__ wallaby-bundle.js?1651867902444&wallabyFileId=bundle:158:1)
at window.moduleBundler.require (http://localhost:58533/__wallaby-webpack.js?1651867902080:28:18)
at Module.window.moduleBundler.modules. (http://localhost:58533/__ wallaby-bundle.js?1651867902444&wallabyFileId=bundle:90:63)
at window.moduleBundler.require (http://localhost:58533/__wallaby-webpack.js?1651867902080:28:18)
at Object.window.moduleBundler.modules. (http://localhost:58533/__ wallaby-bundle.js?1651867902444&wallabyFileId=bundle:3:1)
at Object.window.moduleBundler.require (http://localhost:58533/__wallaby-webpack.js?1651867902080:28:18)
at http://localhost:58533/____wallaby-webpack-setup.js?1651867902083:1:24
Wallaby diagnostics report