Can webpack 4 modules be configured as to allow Jasmine to spy on their members?
问题 I've been unable to get my test jasmine test suite running with webpack 4. After upgrading webpack, I get the following error for almost every test: Error: <spyOn> : getField is not declared writable or has no setter This is due to a common pattern we use to create spys for simple functions is: import * as mod from 'my/module'; //... const funcSpy = spyOn(mod, 'myFunc'); I've played around with module.rules[].type but none of the options seem to do the trick. This webpack GH issue indicates