Skip to content

Commit

Permalink
Merge branch 'jasmine-categories' into webgl-category
Browse files Browse the repository at this point in the history
  • Loading branch information
kristiancalhoun committed Dec 30, 2012
2 parents ff2887f + 16809e0 commit 3ddce27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Specs/SpecRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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') {
Expand All @@ -149,7 +149,7 @@ var afterAll;
test.f = function() {
return describe(name, function() {
suite.apply(null, args);
}, category);
}, categories);
};

createTestsIfReady();
Expand Down
3 changes: 1 addition & 2 deletions ThirdParty/jasmine-1.3.1/jasmine-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3ddce27

Please sign in to comment.