Disable Protractor tests and enable strictDi

This disables the Protractor E2E tests due to a high failure rate
related to a protractor/chrome bug [1] where ChromeDriver would
frequently hang. The E2E tests were mainly used to check for
dependency injection failures, but they didn't catch all (or even
most) failures. Instead, this enables angular's built-in 'strictDi'
mode, which will raise errors during normal development (i.e.
non-production builds) and during unit tests whenever a bad injection
is used.

[1] https://github.com/angular/protractor/issues/2419

Change-Id: I825986a3df457326a6c0c0c3b4d8584617a9d5e2
This commit is contained in:
Tim 2016-03-31 11:56:42 -06:00 committed by Tim Buckley
parent 12016682bb
commit a0561d5503
4 changed files with 7 additions and 3 deletions

View File

@ -38,4 +38,6 @@ angular.module('app').config(onConfig);
var onRun = require('./on_run');
angular.module('app').run(onRun);
angular.bootstrap(document, ['app']);
angular.bootstrap(document, ['app'], {
strictDi: true
});

View File

@ -3,7 +3,7 @@
var config = require('../config');
var gulp = require('gulp');
gulp.task('reports', function() {
gulp.task('reports', ['prod'], function() {
return gulp.src(config.reports.src)
.pipe(gulp.dest(config.reports.dest));

View File

@ -73,7 +73,7 @@
"pretest": "npm install",
"unit": "gulp unit",
"protractor": "gulp e2e",
"test": "gulp unit && gulp e2e",
"test": "gulp unit && gulp reports",
"lint": "eslint ./"
},
"dependencies": {},

View File

@ -2,6 +2,7 @@
var istanbul = require('browserify-istanbul');
var isparta = require('isparta');
var ngAnnotate = require('browserify-ngannotate');
module.exports = function(config) {
config.set({
@ -52,6 +53,7 @@ module.exports = function(config) {
debug: true,
transform: [
'bulkify',
ngAnnotate,
istanbul({
instrumenter: isparta,
ignore: ['**/node_modules/**', '**/test/**']