dac09
10/7/2014 - 11:03 PM

Constants in Jasmine unit tests

Constants in Jasmine unit tests

describe('Test', function() {

  beforeEach(function() {
    module('App', function($provide) {
      $provide.constant('CSRF_TOKEN', 'MOCK_CONSTANT'); // <= mock your constant
    });
  });

  // Tests go here

});