1

I am very new about AngularJs, Parse and Karma.This time the problem I meet I didn't search the similar solution online. So I hope anyone good at these parts can help me. To make the Parse can run in my project, I install the angular-parse-patch from this site: https://github.com/mcwebb/angular-parse-patch Then it works and I can use Parse in my project. However, I am doing the unit-test now and when I use Karma test the controller which contains the Parse code. The error generated.

Error: Parse SDK not available
  at ngParseProvider.$get (C:/Users/Administrator.XZ-20140618RVRF/app/my-project/bower_components/angular-parse-patch/dist/angular-parse-patch.js:1:243)
  at Object.invoke (C:/Users/Administrator.XZ-20140618RVRF/app/my-project/bower_components/angular/angular.js:4523:17)
  at C:/Users/Administrator.XZ-20140618RVRF/app/my-project/bower_components/angular/angular.js:4340:37
  at getService (C:/Users/Administrator.XZ-20140618RVRF/app/my-project/bower_components/angular/angular.js:4482:39)
  at invoke (C:/Users/Administrator.XZ-20140618RVRF/app/my-project/bower_components/angular/angular.js:4514:13)
  at Object.instantiate (C:/Users/Administrator.XZ-20140618RVRF/app/my-project/bower_components/angular/angular.js:4531:27)
  at C:/Users/Administrator.XZ-20140618RVRF/app/my-project/bower_components/angular/angular.js:9197:28
  at C:/Users/Administrator.XZ-20140618RVRF/app/my-project/bower_components/angular-mocks/angular-mocks.js:1882:12
  at Object.<anonymous> (C:/Users/Administrator.XZ-20140618RVRF/app/my-project/src/app/tab1/main.controller.spec.js:16:18)
  at Object.invoke (C:/Users/Administrator.XZ-20140618RVRF/app/my-project/bower_components/angular/angular.js:4523:17)

I guess it caused by the Karma didn't connect the path of the parse-patch.

Mengxi Wang
  • 81
  • 1
  • 8

0 Answers0