升级到Angular版本11后,现在在Travis CI上单元测试失败。在本地,它们确实可以成功(即使在使用相同节点,nvm和npm版本进行全新安装之后)。
所有单元测试的错误都相同-
Failed: fn.bind is not a function
TypeError: fn.bind is not a function
at newTrustedFunctionForJIT (node_modules/@angular/compiler/fesm2015/compiler.js:6845:1)
at JitEvaluator.evaluateCode (node_modules/@angular/compiler/fesm2015/compiler.js:6909:1)
at JitEvaluator.evaluateStatements (node_modules/@angular/compiler/fesm2015/compiler.js:6883:1)
根据错误消息,我认为该问题可能与ngcc有关?有人有类似的问题吗?
今天,我遇到了同样的问题。它涉及使用ChromeHeadless进行测试。
我在docker映像中安装了旧版本的Chrome Headless 83.0.4103.97。将其更新到最新版本88.0.4324.96后,它开始工作。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句