Commit d82a52b9 authored by Robert Knight's avatar Robert Knight

Remove Angular template preprocessor from tests

Since components now require() their own templates, it is no longer
necessary to use a preprocessor to load them.
parent 25d03849
......@@ -322,7 +322,6 @@ describe('annotation', function() {
});
beforeEach(angular.mock.module('h'));
beforeEach(angular.mock.module('h.templates'));
beforeEach(angular.mock.module(function($provide) {
sandbox = sinon.sandbox.create();
......
'use strict';
var angular = require('angular');
var assign = require('core-js/modules/$.object-assign');
var util = require('./util');
var excerpt = require('../excerpt');
......@@ -32,7 +34,6 @@ describe('excerpt directive', function () {
beforeEach(function () {
angular.mock.module('app');
angular.mock.module('h.templates');
});
describe('enabled state', function () {
......
'use strict';
var events = require('../../events');
var angular = require('angular');
var groupList = require('../group-list');
var util = require('./util');
// returns true if a jQuery-like element has
// been hidden directly via an ng-show directive.
//
// This does not check whether the element is a descendant
// of a hidden element
function isElementHidden(element) {
return element.hasClass('ng-hide');
}
describe('groupList', function () {
var $rootScope;
var $window;
......@@ -38,7 +30,6 @@ describe('groupList', function () {
beforeEach(function () {
angular.mock.module('app');
angular.mock.module('h.templates');
});
beforeEach(angular.mock.inject(function (_$rootScope_, _$window_) {
......
......@@ -60,7 +60,6 @@ describe('markdown', function () {
beforeEach(function () {
angular.mock.module('app');
angular.mock.module('h.templates');
});
describe('read only state', function () {
......
'use strict';
var angular = require('angular');
var util = require('./util');
var fakeStorage = {};
......@@ -26,7 +28,6 @@ describe('publishAnnotationBtn', function () {
beforeEach(function () {
angular.mock.module('app');
angular.mock.module('h.templates');
// create a new instance of the directive with default
// attributes
......@@ -38,7 +39,7 @@ describe('publishAnnotationBtn', function () {
canPost: true,
isShared: false,
onSave: function () {},
onSetPrivacy: function (level) {},
onSetPrivacy: function () {},
onCancel: function () {}
});
});
......
......@@ -12,7 +12,6 @@ describe('searchStatusBar', function () {
beforeEach(function () {
angular.mock.module('app');
angular.mock.module('h.templates');
});
context('when there is a filter', function () {
......
......@@ -10,7 +10,6 @@ describe 'share-dialog', ->
.directive('shareDialog', require('../share-dialog'))
beforeEach module('h')
beforeEach module('h.templates')
beforeEach module ($provide) ->
fakeCrossFrame = {frames: []}
......
'use strict';
var angular = require('angular');
var util = require('./util');
describe('sortDropdown', function () {
......@@ -10,7 +12,6 @@ describe('sortDropdown', function () {
beforeEach(function () {
angular.mock.module('app');
angular.mock.module('h.templates');
});
it('should update the sort mode on click', function () {
......
......@@ -43,12 +43,6 @@ module.exports = function(config) {
exclude: [
],
// strip templates of leading path
ngHtml2JsPreprocessor: {
moduleName: 'h.templates',
cacheIdFromPath: path.basename
},
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
......@@ -56,7 +50,6 @@ module.exports = function(config) {
'./test/bootstrap.js': ['browserify'],
'**/*-test.js': ['browserify'],
'**/*-test.coffee': ['browserify'],
'../../templates/client/*.html': ['ng-html2js'],
},
browserify: {
......
......@@ -30,7 +30,6 @@ describe 'loginForm.Controller', ->
.controller('loginFormController', require('../directive/login-form').Controller)
beforeEach module('h')
beforeEach module('h.templates')
beforeEach module ($provide) ->
$provide.value '$timeout', sandbox.spy()
......
......@@ -75,7 +75,6 @@
"karma-browserify": "^3.0.3",
"karma-chai": "^0.1.0",
"karma-mocha": "^0.1.4",
"karma-ng-html2js-preprocessor": "^0.1.0",
"karma-phantomjs-launcher": "^0.1.4",
"karma-sinon": "^1.0.4",
"mocha": "^1.20.1",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment