@samitouri / QOS-React-2 / commits / 284d8d67bd

Upgrade to the latest version of jasmine

Necessary for IE8 support

Thomas Aylott committed Oct 31, 2013 at 13:25 UTC 284d8d67bd32fcd3d83424575a2e2112bfbaeb89
2 files changed +21 -20
vendor/jasmine/jasmine-html.js
-2
@@ -1,5 +1,3 @@
1 -var jasmine = require("./jasmine");
2 -
1 jasmine.HtmlReporterHelpers = {};
2
3 jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) {
vendor/jasmine/jasmine.js
+21 -18
@@ -1,10 +1,12 @@
1 +var isCommonJS = typeof window == "undefined" && typeof exports == "object";
2 +
3 /**
4 * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
5 *
6 * @namespace
7 */
8 var jasmine = {};
7 -exports = module.exports = jasmine;
9 +if (isCommonJS) exports.jasmine = jasmine;
10 /**
11 * @private
12 */
@@ -478,7 +480,7 @@ jasmine.log = function() {
480 var spyOn = function(obj, methodName) {
481 return jasmine.getEnv().currentSpec.spyOn(obj, methodName);
482 };
481 -exports.spyOn = spyOn;
483 +if (isCommonJS) exports.spyOn = spyOn;
484
485 /**
486 * Creates a Jasmine spec that will be added to the current suite.
@@ -496,7 +498,7 @@ exports.spyOn = spyOn;
498 var it = function(desc, func) {
499 return jasmine.getEnv().it(desc, func);
500 };
499 -exports.it = it;
501 +if (isCommonJS) exports.it = it;
502
503 /**
504 * Creates a <em>disabled</em> Jasmine spec.
@@ -509,7 +511,7 @@ exports.it = it;
511 var xit = function(desc, func) {
512 return jasmine.getEnv().xit(desc, func);
513 };
512 -exports.xit = xit;
514 +if (isCommonJS) exports.xit = xit;
515
516 /**
517 * Starts a chain for a Jasmine expectation.
@@ -523,7 +525,7 @@ exports.xit = xit;
525 var expect = function(actual) {
526 return jasmine.getEnv().currentSpec.expect(actual);
527 };
526 -exports.expect = expect;
528 +if (isCommonJS) exports.expect = expect;
529
530 /**
531 * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs.
@@ -533,7 +535,7 @@ exports.expect = expect;
535 var runs = function(func) {
536 jasmine.getEnv().currentSpec.runs(func);
537 };
536 -exports.runs = runs;
538 +if (isCommonJS) exports.runs = runs;
539
540 /**
541 * Waits a fixed time period before moving to the next block.
@@ -544,7 +546,7 @@ exports.runs = runs;
546 var waits = function(timeout) {
547 jasmine.getEnv().currentSpec.waits(timeout);
548 };
547 -exports.waits = waits;
549 +if (isCommonJS) exports.waits = waits;
550
551 /**
552 * Waits for the latchFunction to return true before proceeding to the next block.
@@ -556,7 +558,7 @@ exports.waits = waits;
558 var waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
559 jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments);
560 };
559 -exports.waitsFor = waitsFor;
561 +if (isCommonJS) exports.waitsFor = waitsFor;
562
563 /**
564 * A function that is called before each spec in a suite.
@@ -568,7 +570,7 @@ exports.waitsFor = waitsFor;
570 var beforeEach = function(beforeEachFunction) {
571 jasmine.getEnv().beforeEach(beforeEachFunction);
572 };
571 -exports.beforeEach = beforeEach;
573 +if (isCommonJS) exports.beforeEach = beforeEach;
574
575 /**
576 * A function that is called after each spec in a suite.
@@ -580,7 +582,7 @@ exports.beforeEach = beforeEach;
582 var afterEach = function(afterEachFunction) {
583 jasmine.getEnv().afterEach(afterEachFunction);
584 };
583 -exports.afterEach = afterEach;
585 +if (isCommonJS) exports.afterEach = afterEach;
586
587 /**
588 * Defines a suite of specifications.
@@ -600,7 +602,7 @@ exports.afterEach = afterEach;
602 var describe = function(description, specDefinitions) {
603 return jasmine.getEnv().describe(description, specDefinitions);
604 };
603 -exports.describe = describe;
605 +if (isCommonJS) exports.describe = describe;
606
607 /**
608 * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development.
@@ -611,7 +613,7 @@ exports.describe = describe;
613 var xdescribe = function(description, specDefinitions) {
614 return jasmine.getEnv().xdescribe(description, specDefinitions);
615 };
614 -exports.xdescribe = xdescribe;
616 +if (isCommonJS) exports.xdescribe = xdescribe;
617
618
619 // Provide the XMLHttpRequest class for IE 5.x-6.x:
@@ -871,10 +873,11 @@ jasmine.Env.prototype.it = function(description, func) {
873 };
874
875 jasmine.Env.prototype.xit = function(desc, func) {
874 - var spec = this.it(desc, func);
875 - spec.results_.skipped = true;
876 - spec.runs = function() {};
877 - return spec;
876 + return {
877 + id: this.nextSpecId(),
878 + runs: function() {
879 + }
880 + };
881 };
882
883 jasmine.Env.prototype.compareRegExps_ = function(a, b, mismatchKeys, mismatchValues) {
@@ -2592,6 +2595,6 @@ jasmine.WaitsForBlock.prototype.execute = function(onComplete) {
2595 jasmine.version_= {
2596 "major": 1,
2597 "minor": 3,
2595 - "build": 1,
2596 - "revision": 1354556913
2598 + "build": 0,
2599 + "revision": 1354052693
2600 };