From 8e05eed34b79d36a978bcdf4075f9f180d905a44 Mon Sep 17 00:00:00 2001 From: Kristian Calhoun Date: Sun, 30 Dec 2012 15:09:11 -0500 Subject: [PATCH 1/2] Rename category to categories. --- Specs/SpecRunner.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Specs/SpecRunner.js b/Specs/SpecRunner.js index ad68aee8f510..cf1054d13fb4 100644 --- a/Specs/SpecRunner.js +++ b/Specs/SpecRunner.js @@ -3,8 +3,8 @@ * @param {Array} deps An array of dependencies, to be passed to require. * @param {String|Function} name Either the name of the test suite, or the test suite itself, * in which case the first dependency in the array will be used as the name. - * @param {Function|String} [suite] Either the test suite or a category name for the suite. - * @param {String} [category] An optional category for the test suite. + * @param {Function|Array} [suite] Either the test suite or an array of category names for the suite. + * @param {Array} [categories] An optional array of category names for the test suite. */ var defineSuite; @@ -127,9 +127,9 @@ var afterAll; //start loading all of Cesium early, so it's all available for code coverage calculations. require(['Cesium']); - defineSuite = function(deps, name, suite, category) { + defineSuite = function(deps, name, suite, categories) { if (typeof suite === 'object' || typeof suite === 'string') { - category = suite; + categories = suite; } if (typeof name === 'function') { @@ -149,7 +149,7 @@ var afterAll; test.f = function() { return describe(name, function() { suite.apply(null, args); - }, category); + }, categories); }; createTestsIfReady(); From 16809e029014c64ee8ed79d5b6674d55c938c58b Mon Sep 17 00:00:00 2001 From: Kristian Calhoun Date: Sun, 30 Dec 2012 15:16:48 -0500 Subject: [PATCH 2/2] Remove condition that specs must have a category to run under `All`. --- ThirdParty/jasmine-1.3.1/jasmine-html.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ThirdParty/jasmine-1.3.1/jasmine-html.js b/ThirdParty/jasmine-1.3.1/jasmine-html.js index 02e9a06c13a1..60d0303ec9ff 100644 --- a/ThirdParty/jasmine-1.3.1/jasmine-html.js +++ b/ThirdParty/jasmine-1.3.1/jasmine-html.js @@ -227,8 +227,7 @@ jasmine.HtmlReporter = function(_doc) { var i, matchedCategory = false; - if (focusedCategories && focusedCategories.indexOf('all') !== -1 - && (typeof spec.categories !== 'undefined' || typeof spec.suite.categories !== 'undefined')) { + if (focusedCategories && focusedCategories.indexOf('all') !== -1) { if (typeof spec.categories !== 'undefined') { if (paramMap.not && spec.categories.indexOf(paramMap.not) !== -1) {