1

We recently upgraded our Angular version from 7 to 8 and have run into some problems when using Jest as our test runner. The goal is to get our build pipeline running again with our javascript tests. We are getting an error: An unhandled exception occurred: core_1.experimental.workspace.Workspace.fromPath is not a function

I have upgraded both "@angular-builders/jest": "8.0.4" as well as upgraded "jest": "24.8.0" as per the angular-builders README.

I have updated our Jest config property setupTestFrameworkScriptFile to setupFilesAfterEnv

I have tried clearing out my node_modules and reinstalling them as per this issue

4

1 回答 1

1

我还升级到 Angular 8,然后尝试切换到使用 Jest 测试而不是 Karma。我收到了这个错误:

An unhandled exception occurred: architect_1.createBuilder is not a function

事实证明,该ng update命令没有更新某些依赖项的版本。就我而言,我需要获得@angular-devkit/build-angular(version "^0.801.2") 的更新版本。尝试检查所有依赖版本。我有 WebStorm IDE,它很好地为我推荐了最新版本。

于 2019-07-25T18:29:54.960 回答