diff --git a/angularFiles.js b/angularFiles.js index 715028733062..a9d636b115f2 100755 --- a/angularFiles.js +++ b/angularFiles.js @@ -114,7 +114,7 @@ angularFiles = { 'test/ngMobile/**/*.js' ], - 'jstd': [ + 'karma': [ 'components/jquery/jquery.js', 'test/jquery_remove.js', '@angularSrc', @@ -126,18 +126,18 @@ angularFiles = { 'example/personalLog/test/*.js' ], - 'jstdExclude': [ + 'karmaExclude': [ 'test/jquery_alias.js', 'src/angular-bootstrap.js', 'src/ngScenario/angular-bootstrap.js' ], - 'jstdScenario': [ + 'karmaScenario': [ 'build/angular-scenario.js', 'build/docs/docs-scenario.js' ], - "jstdModules": [ + "karmaModules": [ 'build/angular.js', '@angularSrcModules', 'src/ngScenario/browserTrigger.js', @@ -151,21 +151,7 @@ angularFiles = { 'test/ngMobile/**/*.js' ], - 'jstdPerf': [ - '@angularSrc', - '@angularSrcModules', - 'src/ngMock/angular-mocks.js', - 'perf/data/*.js', - 'perf/testUtils.js', - 'perf/*.js' - ], - - 'jstdPerfExclude': [ - 'src/ng/angular-bootstrap.js', - 'src/ngScenario/angular-bootstrap.js' - ], - - 'jstdJquery': [ + 'karmaJquery': [ 'components/jquery/jquery.js', 'test/jquery_alias.js', '@angularSrc', @@ -178,7 +164,7 @@ angularFiles = { 'example/personalLog/test/*.js' ], - 'jstdJqueryExclude': [ + 'karmaJqueryExclude': [ 'src/angular-bootstrap.js', 'src/ngScenario/angular-bootstrap.js', 'test/jquery_remove.js' @@ -186,29 +172,22 @@ angularFiles = { }; if (exports) { - exports.files = angularFiles - exports.mergeFiles = function mergeFiles() { + exports.files = angularFiles; + exports.mergeFilesFor = function() { var files = []; - [].splice.call(arguments, 0).forEach(function(file) { - if (file.match(/karma/)) { - files.push(file); - } else { - angularFiles[file].forEach(function(f) { - // replace @ref - var match = f.match(/^\@(.*)/); - if (match) { - var deps = angularFiles[match[1]]; - files = files.concat(deps); - } else { - if (!/jstd|jasmine/.test(f)) { //TODO(i): remove once we don't have jstd/jasmine in repo - files.push(f); - } - } - }); - } + Array.prototype.slice.call(arguments, 0).forEach(function(filegroup) { + angularFiles[filegroup].forEach(function(file) { + // replace @ref + var match = file.match(/^\@(.*)/); + if (match) { + files = files.concat(angularFiles[match[1]]); + } else { + files.push(file); + } + }); }); return files; - } + }; } diff --git a/karma-jqlite.conf.js b/karma-jqlite.conf.js index 9284f491b93d..d3a297a8ca45 100644 --- a/karma-jqlite.conf.js +++ b/karma-jqlite.conf.js @@ -5,8 +5,8 @@ module.exports = function(config) { sharedConfig(config); config.set({ - files: angularFiles.mergeFiles('jstd'), - exclude: angularFiles.files.jstdExclude, + files: angularFiles.mergeFilesFor('karma'), + exclude: angularFiles.mergeFilesFor('karmaExclude'), junitReporter: { outputFile: 'test_out/jqlite.xml', diff --git a/karma-jquery.conf.js b/karma-jquery.conf.js index 28f2fae2523c..236824f774d5 100644 --- a/karma-jquery.conf.js +++ b/karma-jquery.conf.js @@ -5,8 +5,8 @@ module.exports = function(config) { sharedConfig(config); config.set({ - files: angularFiles.mergeFiles('jstdJquery'), - exclude: angularFiles.files.jstdJqueryExclude, + files: angularFiles.mergeFilesFor('karmaJquery'), + exclude: angularFiles.mergeFilesFor('karmaJqueryExclude'), junitReporter: { outputFile: 'test_out/jquery.xml', diff --git a/karma-modules.conf.js b/karma-modules.conf.js index f4c28eb3c596..38c22b817e9c 100644 --- a/karma-modules.conf.js +++ b/karma-modules.conf.js @@ -5,7 +5,7 @@ module.exports = function(config) { sharedConfig(config); config.set({ - files: angularFiles.mergeFiles('jstdModules', 'angularSrcModules'), + files: angularFiles.mergeFilesFor('karmaModules', 'angularSrcModules'), junitReporter: { outputFile: 'test_out/modules.xml',