From e6e0d61b4bed2a5fd15274d80a853845fecd2dc7 Mon Sep 17 00:00:00 2001 From: flut1 Date: Sat, 16 Jul 2016 12:58:31 +0200 Subject: [PATCH 1/2] Move karma.conf.js to root of repo Move the karma.conf.js configuration file to the root of the repository, for better karma support in Webstorm. Webstorm can't currently handle karma configuration in a subfolder well. --- config/karma.conf.js => karma.conf.js | 5 +---- package.json | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) rename config/karma.conf.js => karma.conf.js (94%) diff --git a/config/karma.conf.js b/karma.conf.js similarity index 94% rename from config/karma.conf.js rename to karma.conf.js index c27215e..f6692e4 100644 --- a/config/karma.conf.js +++ b/karma.conf.js @@ -6,9 +6,6 @@ module.exports = function(config) { config.set({ - // base path that will be used to resolve all patterns (eg. files, exclude) - basePath: '../', - // List of test frameworks we will use. Most of them are provided by separate packages (adapters). // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ['mocha', 'chai', 'source-map-support'], @@ -34,7 +31,7 @@ module.exports = function(config) ] }, - webpack: require('./webpack.config.test')(), + webpack: require('./config/webpack.config.test')(), // Make dev server silent. webpackServer: { noInfo: true }, diff --git a/package.json b/package.json index b483d1c..36a6a37 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "typings": "typings install", "test": "npm run validate", "validate": "npm-run-all -p validate-webpack lint test-unit -s check-coverage", - "test-unit": "karma start config/karma.conf.js --single-run --browsers PhantomJS", + "test-unit": "karma start karma.conf.js --single-run --browsers PhantomJS", "check-coverage": "istanbul check-coverage --statement 1 --branches 1 --functions 1 --lines 1", "validate-webpack": "webpack-validator config/webpack.config.js", "lint": "tslint -c tslint.json src/**/*.ts", From f63ca81b76da7c89b56f0cd4e260ef40d8226f95 Mon Sep 17 00:00:00 2001 From: flut1 Date: Sat, 16 Jul 2016 13:13:32 +0200 Subject: [PATCH 2/2] Remove redundant karma.conf.js from script The karma.conf.js no longer needs a reference in the npm test-unit script, because it is in the default location. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 36a6a37..fe4381e 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "typings": "typings install", "test": "npm run validate", "validate": "npm-run-all -p validate-webpack lint test-unit -s check-coverage", - "test-unit": "karma start karma.conf.js --single-run --browsers PhantomJS", + "test-unit": "karma start --single-run --browsers PhantomJS", "check-coverage": "istanbul check-coverage --statement 1 --branches 1 --functions 1 --lines 1", "validate-webpack": "webpack-validator config/webpack.config.js", "lint": "tslint -c tslint.json src/**/*.ts",