From cbe9ed8c235d661c9c85b831471bbb6186136dd1 Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Wed, 2 Mar 2016 13:57:09 -0600 Subject: [PATCH] chore(): update karma tests to work with npm3 --- gulpfile.js | 1 + package.json | 3 ++- scripts/karma/karma.conf.js | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index e72e11e83c..d2e2928fc9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -668,6 +668,7 @@ function buildDemoSass(isProductionMode) { */ require('./scripts/snapshot/snapshot.task')(gulp, argv, buildConfig); +// requires bundle.system to be run once gulp.task('karma', ['tests'], function() { var karma = require('karma').server; return karma.start({ configFile: __dirname + '/scripts/karma/karma.conf.js' }) diff --git a/package.json b/package.json index 78bd079c85..b6d223da2e 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "html-entities": "^1.1.3", "htmlparser2": "^3.8.3", "ionic-cz-conventional-changelog": "^1.0.0", + "jasmine-core": "^2.4.1", "jasmine-node": "^1.14.5", "js-yaml": "^3.4.2", "karma": "^0.12.31", @@ -88,4 +89,4 @@ "path": "node_modules/ionic-cz-conventional-changelog" } } -} \ No newline at end of file +} diff --git a/scripts/karma/karma.conf.js b/scripts/karma/karma.conf.js index 17214bbda3..e2ddc4b2ea 100644 --- a/scripts/karma/karma.conf.js +++ b/scripts/karma/karma.conf.js @@ -1,5 +1,7 @@ var buildConfig = require('../build/config'); + + module.exports = function(config) { config.set({ singleRun: true, @@ -8,7 +10,8 @@ module.exports = function(config) { frameworks: ['jasmine'], files: [ - 'node_modules/systemjs/node_modules/es6-module-loader/dist/es6-module-loader.js', + 'node_modules/systemjs/node_modules/es6-module-loader/dist/es6-module-loader.js', //npm2 + 'node_modules/es6-module-loader/dist/es6-module-loader.src.js', //npm3 'node_modules/systemjs/dist/system.js', 'scripts/karma/system.config.js', 'node_modules/angular2/bundles/angular2-polyfills.min.js',