2

I migrated an angular 7 project to angular 8. The application runs and npm test works but ng test does not work.

I created a simple angular 8 application with the same setup. Then I added the dependencies step by step to the package.json. After each new dependency I deleted the node_modules folder and the package-lock.json file. The problem appears when the dependency to devextreme-angular was added.

The sample project is hosted at GitHub (https://github.com/agerbig/angular8-jest-devextreme).

The problem is this dependency:

"dependencies": {
    ...
    "devextreme-angular": "^19.1.4",
    ...
  },

If you build the project with npm install and execute the tests with ng test the following error occurs:

An unhandled exception occurred: core_1.experimental.workspace.Workspace.fromPath is not a function

When you remove the dependency to devextreme-angular and execute the following commands the tests are successfully executed:

rm -rf node_modules
rm package-lock.json
npm install
ng test

The project needs the devextreme-angular component.

Any ideas how to get it working?

Here is the related Issue: https://github.com/DevExpress/devextreme-angular/issues/978

skyboyer
  • 22,209
  • 7
  • 57
  • 64

0 Answers0