From ecf233c1b4add392d52cd2864e05cd14bbf456ea Mon Sep 17 00:00:00 2001 From: Usman Khalid <2200617@gmail.com> Date: Tue, 3 May 2016 16:54:01 +0500 Subject: [PATCH] Keep karma config file docs only in karma.common.conf.js. Duplicate stuff tends to get out of sync. --- cms/static/karma_cms.conf.js | 22 ++--------------- cms/static/karma_cms_squire.conf.js | 22 ++--------------- .../xmodule/xmodule/js/karma_xmodule.conf.js | 22 ++--------------- common/static/common/js/karma.common.conf.js | 24 ++++++++++++++++++- common/static/karma_common.conf.js | 22 ++--------------- common/static/karma_common_requirejs.conf.js | 22 ++--------------- lms/static/karma_lms.conf.js | 22 ++--------------- lms/static/karma_lms_coffee.conf.js | 22 ++--------------- 8 files changed, 37 insertions(+), 141 deletions(-) diff --git a/cms/static/karma_cms.conf.js b/cms/static/karma_cms.conf.js index a33692da00..956c7c65b0 100644 --- a/cms/static/karma_cms.conf.js +++ b/cms/static/karma_cms.conf.js @@ -1,23 +1,5 @@ -// Common JavaScript tests, using RequireJS. -// -// To run all the tests and print results to the console: -// -// karma start cms/static/karma_cms.conf.js -// -// -// To run the tests for debugging: Debugging can be done in any browser -// but Chrome's developer console debugging experience is best. -// -// karma start cms/static/karma_cms.conf.js --browsers=BROWSER --single-run=false -// -// -// To run the tests with coverage and junit reports: -// -// karma start cms/static/karma_cms.conf.js --browsers=BROWSER --coverage -// --junitreportpath= --coveragereportpath= -// -// where `BROWSER` could be Chrome or Firefox. -// +// Karma config for cms suite. +// Docs in common/static/common/js/karma.common.conf.js /* jshint node: true */ /*jshint -W079 */ diff --git a/cms/static/karma_cms_squire.conf.js b/cms/static/karma_cms_squire.conf.js index bf6756dd57..fbd4c04986 100644 --- a/cms/static/karma_cms_squire.conf.js +++ b/cms/static/karma_cms_squire.conf.js @@ -1,23 +1,5 @@ -// Common JavaScript tests, using RequireJS. -// -// To run all the tests and print results to the console: -// -// karma start cms/static/karma_cms_squire.conf.js -// -// -// To run the tests for debugging: Debugging can be done in any browser -// but Chrome's developer console debugging experience is best. -// -// karma start cms/static/karma_cms_squire.conf.js --browsers=BROWSER --single-run=false -// -// -// To run the tests with coverage and junit reports: -// -// karma start cms/static/karma_cms_squire.conf.js --browsers=BROWSER --coverage -// --junitreportpath= --coveragereportpath= -// -// where `BROWSER` could be Chrome or Firefox. -// +// Karma config for cms-squire suite. +// Docs in common/static/common/js/karma.common.conf.js /* jshint node: true */ /*jshint -W079 */ diff --git a/common/lib/xmodule/xmodule/js/karma_xmodule.conf.js b/common/lib/xmodule/xmodule/js/karma_xmodule.conf.js index c0067fc257..b3ee098cdc 100644 --- a/common/lib/xmodule/xmodule/js/karma_xmodule.conf.js +++ b/common/lib/xmodule/xmodule/js/karma_xmodule.conf.js @@ -1,23 +1,5 @@ -// Xmodule Tests -// -// To run all the tests and print results to the console: -// -// karma start common/lib/xmodule/xmodule/js/karma_xmodule.conf.js -// -// -// To run the tests for debugging: Debugging can be done in any browser -// Chrome's developer console debugging experience is the best though -// -// karma start common/lib/xmodule/xmodule/js/karma-xmodule.conf.js --browsers=BROWSER --single-run=false -// -// -// To run the tests with coverage and junit reports: -// -// karma start common/lib/xmodule/xmodule/js/karma-xmodule.conf.js -// --browsers=BROWSER --coverage --junitreportpath= --coveragereportpath= -// -// where `BROWSER` could be Chrome or Firefox. -// +// Karma config for xmodule suite. +// Docs in common/static/common/js/karma.common.conf.js /* jshint node: true */ /*jshint -W079 */ diff --git a/common/static/common/js/karma.common.conf.js b/common/static/common/js/karma.common.conf.js index 709c701187..7d678adae4 100644 --- a/common/static/common/js/karma.common.conf.js +++ b/common/static/common/js/karma.common.conf.js @@ -1,4 +1,26 @@ -// Common configuration for Karma +// Common settings and helpers for setting up Karma config. +// +// To run all the tests in a suite and print results to the console: +// +// karma start +// E.g. karma start lms/static/karma_lms.conf.js +// +// +// To run the tests for debugging: Debugging can be done in any browser +// but Chrome's developer console debugging experience is best. +// +// karma start --browsers=BROWSER --single-run=false +// +// +// To run the tests with coverage and junit reports: +// +// karma start --browsers=BROWSER +// --coverage --junitreportpath= --coveragereportpath= +// +// where `BROWSER` could be Chrome or Firefox. +// + + /* jshint node: true */ /*jshint -W079 */ 'use strict'; diff --git a/common/static/karma_common.conf.js b/common/static/karma_common.conf.js index e0fda8d515..d9864bdc58 100644 --- a/common/static/karma_common.conf.js +++ b/common/static/karma_common.conf.js @@ -1,23 +1,5 @@ -// Common JavaScript tests -// -// To run all the tests and print results to the console: -// -// karma start common/static/karma_common.conf.js -// -// -// To run the tests for debugging: Debugging can be done in any browser -// but Chrome's developer console debugging experience is best. -// -// karma start common/static/karma_common.conf.js --browsers=BROWSER --single-run=false -// -// -// To run the tests with coverage and junit reports: -// -// karma start common/static/karma_common.conf.js --browsers=BROWSER --coverage -// --junitreportpath= --coveragereportpath= -// -// where `BROWSER` could be Chrome or Firefox. -// +// Karma config for common suite. +// Docs in common/static/common/js/karma.common.conf.js /* jshint node: true */ /*jshint -W079 */ diff --git a/common/static/karma_common_requirejs.conf.js b/common/static/karma_common_requirejs.conf.js index 7590ff4694..b06bb38837 100644 --- a/common/static/karma_common_requirejs.conf.js +++ b/common/static/karma_common_requirejs.conf.js @@ -1,23 +1,5 @@ -// Common JavaScript tests, using RequireJS. -// -// To run all the tests and print results to the console: -// -// karma start common/static/karma_common_requirejs.conf.js -// -// -// To run the tests for debugging: Debugging can be done in any browser -// but Chrome's developer console debugging experience is best. -// -// karma start karma_common_requirejs.conf.js --browsers=BROWSER --single-run=false -// -// -// To run the tests with coverage and junit reports: -// -// karma start karma_common_requirejs.conf.js --browsers=BROWSER --coverage -// --junitreportpath= --coveragereportpath= -// -// where `BROWSER` could be Chrome or Firefox. -// +// Karma config for common-requirejs suite. +// Docs in common/static/common/js/karma.common.conf.js /* jshint node: true */ /*jshint -W079 */ diff --git a/lms/static/karma_lms.conf.js b/lms/static/karma_lms.conf.js index af8bcb4eba..b49932ec74 100644 --- a/lms/static/karma_lms.conf.js +++ b/lms/static/karma_lms.conf.js @@ -1,23 +1,5 @@ -// LMS JavaScript tests, using RequireJS. -// -// To run all the tests and print results to the console: -// -// karma start lms/static/karma_lms.conf.js -// -// -// To run the tests for debugging: Debugging can be done in any browser but -// Chrome's developer console debugging experience is best. -// -// karma start lms/static/karma_lms.conf.js --browsers=BROWSER --single-run=false -// -// -// To run the tests with coverage and junit reports: -// -// karma start lms/static/karma_lms.conf.js --browsers=BROWSER -// --coverage --junitreportpath= --coveragereportpath= -// -// where `BROWSER` could be Chrome or Firefox. -// +// Karma config for lms suite. +// Docs in common/static/common/js/karma.common.conf.js /* jshint node: true */ /*jshint -W079 */ diff --git a/lms/static/karma_lms_coffee.conf.js b/lms/static/karma_lms_coffee.conf.js index 1f4f0d9ae2..d15d212497 100644 --- a/lms/static/karma_lms_coffee.conf.js +++ b/lms/static/karma_lms_coffee.conf.js @@ -1,23 +1,5 @@ -// LMS Coffee Script Tests. -// -// To run all the tests and print results to the console: -// -// karma start lms/static/karma_lms_coffee.conf.js -// -// -// To run the tests for debugging: Debugging can be done in any browser -// but Chrome's developer console debugging experience is best. -// -// karma start lms/static/karma_lms_coffee.conf.js --browsers=BROWSER --single-run=false -// -// -// To run the tests with coverage and junit reports: -// -// karma start lms/static/karma_lms_coffee.conf.js --browsers=BROWSER -// --coverage --junitreportpath= --coveragereportpath= -// -// where `BROWSER` could be Chrome or Firefox. -// +// Karma config for lms-coffee suite. +// Docs in common/static/common/js/karma.common.conf.js /* jshint node: true */ /*jshint -W079 */