Skip to content

Undefined 'Model' on test with Karma Angular #2615

Discussion options

You must be logged in to vote

Hi, thanks for updating the repository.

If using a version of JointJS before version 4.0.0, it is necessary to include the dependencies that JointJS had in the past.

Updating to the following in the "test" property in angular.json will fix the issue.

"scripts": [
      "./node_modules/jquery/dist/jquery.min.js",
      "./node_modules/lodash/lodash.min.js",
      "./node_modules/backbone/backbone-min.js",
      "./node_modules/jointjs/dist/joint.min.js"
]

I strongly encourage you to update to the latest version of JointJS, @joint/core (4.0.2) . It is dependency free, and you won't run into this issue.
https://www.npmjs.com/package/@joint/core

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@jamesgeorgewilliams
Comment options

@mpuerto-paymefy
Comment options

@mpuerto-paymefy
Comment options

@jamesgeorgewilliams
Comment options

Answer selected by mpuerto-paymefy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants