'Angular - DSUtils.deepMixIn undefined when running karma tests after js-data upgrade

I am upgrading js-data from 2.10.0 to 3.0.11. After upgrading the angular node app seems to be running fine. However when I am running karma tests, they are failing.

Webpack: 5.68.0 Angular: 1.8.2 Karma: 6.3.11 "js-data": "3.0.11", "js-data-angular": "3.2.4", "js-data-http": "3.0.0",

But when I try to run karma tests of the app, they are failing with below error.

PhantomJS 2.1.1 (Windows 8) ERROR
  An error was thrown in afterAll
  TypeError: undefined is not an object (evaluating 'DSUtils.deepMixIn')
  dist/commons.js:139628
  Error: [$injector:nomod] Module 'app' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
  https://errors.angularjs.org/1.8.2/$injector/nomod?p0=app
  dist/commons.js:47094
angular
  .module('app', [
    'ui.router',
    'ngAnimate',
    'ngCookies',
    'ngResource',
    'ngSanitize',
    'ngTouch',
    'ngDialog',
    'config',
    'pascalprecht.translate',
    'js-data',
    'mm.foundation',
    'rzSlider',
    '720kb.tooltips',
    'angular-carousel',
    'angular-loading-bar',
    'ng.deviceDetector',
    'angulartics',
    'angulartics.google.tagmanager',
    'ngIdle',
    'pageslide-directive',
    'duScroll',
  ])

Update:

Seems like its linked to https://github.com/js-data/js-data-angular/issues/371 which still remains unresolved.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source