Angular 单元测试失败,但不是在本地
Angular unit tests fail, but not locally
升级到 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 有关?有人遇到过类似的问题吗?
升级到 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 有关?有人遇到过类似的问题吗?