From 9342428c18e7fc24079acd053a482c647c9b779d Mon Sep 17 00:00:00 2001 From: Brian Jacobel Date: Tue, 5 Apr 2016 09:49:16 -0400 Subject: [PATCH 1/4] Add npm lifecycle script for test - now you don't need a global Gulp installed --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 45ae2b9d..ef74b124 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,9 @@ "javascript" ], "homepage": "https://github.com/edx/edx-ui-toolkit", + "scripts": { + "test": "gulp test" + }, "dependencies": { "backbone": "~1.2.3", "backbone.paginator": "~2.0.3", From 35a5c220d8b369157932ae20e57a26d33be2c315 Mon Sep 17 00:00:00 2001 From: Brian Jacobel Date: Tue, 5 Apr 2016 10:16:38 -0400 Subject: [PATCH 2/4] gulp-karma is deprecated and not needed --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index ef74b124..b905792a 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "gulp-coveralls": "~0.1.4", "gulp-jscs": "~3.0.2", "gulp-jshint": "~2.0.0", - "gulp-karma": "~0.0.5", "gulp-util": "~3.0.7", "jasmine": "~2.4.1", "jasmine-core": "~2.4.1", From 28281306877d190e6caf81350af222b5b9f808e8 Mon Sep 17 00:00:00 2001 From: Brian Jacobel Date: Tue, 5 Apr 2016 13:14:05 -0400 Subject: [PATCH 3/4] Fix issue where JSCS was linting a vendor file --- gulp/tasks/jscs.js | 2 +- gulp/tasks/lint.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gulp/tasks/jscs.js b/gulp/tasks/jscs.js index a8d9dbf9..10bbdcd4 100644 --- a/gulp/tasks/jscs.js +++ b/gulp/tasks/jscs.js @@ -5,7 +5,7 @@ gulp = require('gulp'), paths = { lint: [ - 'test/**/*.js', + 'test/**/!(jquery.simulate)*.js', 'components/**/*.js', 'gulp/tasks/*.js', 'gulpfile.js' diff --git a/gulp/tasks/lint.js b/gulp/tasks/lint.js index 5a162dec..094687c8 100644 --- a/gulp/tasks/lint.js +++ b/gulp/tasks/lint.js @@ -5,7 +5,7 @@ gulp = require('gulp'), paths = { lint: [ - 'test/**/*.js', + 'test/**/!(jquery.simulate)*.js', 'components/**/*.js', 'gulp/tasks/*.js', 'gulpfile.js' From 3258744d35a10292f93630609139396649a132aa Mon Sep 17 00:00:00 2001 From: Brian Jacobel Date: Tue, 5 Apr 2016 14:06:30 -0400 Subject: [PATCH 4/4] text-summary reporter is bugged and hangs Karma - remove it. See: https://github.com/karma-runner/karma-coverage/issues/209 --- test/karma.conf.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/karma.conf.js b/test/karma.conf.js index 02c455ea..cd61c77e 100644 --- a/test/karma.conf.js +++ b/test/karma.conf.js @@ -83,8 +83,7 @@ module.exports = function(config, options) { reporters: [ {type: 'html', subdir: 'coverage-js/html'}, {type: 'cobertura', file: 'coverage.xml'}, - {type: 'lcov', dir: 'coverage/'}, - {type: 'text-summary'} + {type: 'lcov', dir: 'coverage/'} ] },