0

I am trying to show an example of mocha in plunker but it is giving me angular mocks undefined issues. I tried copy and pasting bower angular mocks to no avail.

beforeEach(function(){
  angular.mock.module('plunker');

});

Errored code from angular-mocks says window undefined

(window.beforeEach || window.setup)(function() {
  annotatedFunctions = [];
  currentSpec = this;
});

Plunker found here

technoSpino
  • 510
  • 4
  • 12

1 Answers1

3

You just need to move the angular mocks script below the call to mocha.setup('bdd'); and it works fine.

I've updated your plunk at http://plnkr.co/edit/yH9V6b?p=preview

Jason Watmore
  • 4,521
  • 2
  • 32
  • 36