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:
parent
12016682bb
commit
a0561d5503
@ -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
|
||||
});
|
||||
|
@ -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));
|
||||
|
@ -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": {},
|
||||
|
@ -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/**']
|
||||
|
Loading…
Reference in New Issue
Block a user