teabag 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/assets/javascripts/teabag-mocha.js +154 -123
- data/app/assets/javascripts/teabag-qunit.js +401 -195
- data/app/assets/javascripts/teabag-teabag.js +3 -4
- data/app/assets/javascripts/teabag/mocha.coffee +1 -1
- data/app/assets/javascripts/teabag/mocha/reporters/html.coffee +1 -1
- data/app/assets/javascripts/teabag/qunit.coffee +1 -1
- data/app/assets/javascripts/teabag/qunit/reporters/html.coffee +1 -1
- data/app/assets/javascripts/teabag/teabag.coffee +1 -0
- data/lib/teabag/version.rb +1 -1
- data/spec/dummy/log/development.log +18711 -0
- data/spec/dummy/log/test.log +632 -0
- data/spec/dummy/tmp/cache/assets/C35/A30/sprockets%2F29906bf540f7d2e081088494b2554989 +0 -0
- data/spec/dummy/tmp/cache/assets/C4E/9B0/sprockets%2Fa807397434c9262c3d62da3e91152184 +0 -0
- data/spec/dummy/tmp/cache/assets/C5B/D00/sprockets%2F01f43815683089878e371a5d078d3e2c +0 -0
- data/spec/dummy/tmp/cache/assets/C72/150/sprockets%2F4194031b4b51b6422c14ac697e3455e5 +0 -0
- data/spec/dummy/tmp/cache/assets/C75/D50/sprockets%2F5302968a40e08d2c011aa38666d273f6 +0 -0
- data/spec/dummy/tmp/cache/assets/C78/F80/sprockets%2F9161622ddd251097a4ab816b8220984c +0 -0
- data/spec/dummy/tmp/cache/assets/C7C/AC0/sprockets%2F29124be1160817c61bb4878894b2ba55 +0 -0
- data/spec/dummy/tmp/cache/assets/C7D/8F0/sprockets%2Ff13d01b85f2449a4f0638ff260425906 +0 -0
- data/spec/dummy/tmp/cache/assets/C7E/E80/sprockets%2F38544f84f61bb3942d24104e39e108c4 +0 -0
- data/spec/dummy/tmp/cache/assets/C85/6E0/sprockets%2F9e583044ba9762ac39f15431ed504495 +0 -0
- data/spec/dummy/tmp/cache/assets/C8A/460/sprockets%2F77bffd9959420103906722b404ae8d59 +0 -0
- data/spec/dummy/tmp/cache/assets/C91/FA0/sprockets%2F2eb81283f5789ae91a69344552db3856 +0 -0
- data/spec/dummy/tmp/cache/assets/C97/430/sprockets%2Fc049582fd1c9178ff983323f75326f64 +0 -0
- data/spec/dummy/tmp/cache/assets/C9D/E90/sprockets%2F3045c9533f179d3e1c805d163ed002a0 +0 -0
- data/spec/dummy/tmp/cache/assets/CA3/C80/sprockets%2F00916393d1e2e947ddafa91701411a73 +0 -0
- data/spec/dummy/tmp/cache/assets/CA6/DF0/sprockets%2F7da83747ce56e49393b6b8726587f846 +0 -0
- data/spec/dummy/tmp/cache/assets/CA9/C40/sprockets%2F932b7e2cd1e067289ab51190800814df +0 -0
- data/spec/dummy/tmp/cache/assets/CAD/410/sprockets%2F651414e5c7e86f05c5108dc71626b25c +0 -0
- data/spec/dummy/tmp/cache/assets/CAF/0F0/sprockets%2F6000e67cf3f2377f860c24da7c819701 +0 -0
- data/spec/dummy/tmp/cache/assets/CB0/700/sprockets%2F006af6bf0f6b55777b03c4615c853881 +0 -0
- data/spec/dummy/tmp/cache/assets/CB1/B50/sprockets%2F44b5b96ee7652d66a217a1756431c4a8 +0 -0
- data/spec/dummy/tmp/cache/assets/CB6/120/sprockets%2F2df706e820de0f82332a613c49f47867 +0 -0
- data/spec/dummy/tmp/cache/assets/CBB/FA0/sprockets%2F74922109263bdc965b2e9567eec6d154 +0 -0
- data/spec/dummy/tmp/cache/assets/CBD/AF0/sprockets%2Fd687ec33822256e9444e8cd04f1b4873 +0 -0
- data/spec/dummy/tmp/cache/assets/CBF/630/sprockets%2F707d2db81468088470d476abff35388d +0 -0
- data/spec/dummy/tmp/cache/assets/CC2/EC0/sprockets%2F76bf80cb571ca530357f78db78167866 +0 -0
- data/spec/dummy/tmp/cache/assets/CCB/3B0/sprockets%2F9535146026add9cffa012ee220204a66 +0 -0
- data/spec/dummy/tmp/cache/assets/CCC/DB0/sprockets%2F3998958d61cda73452466f5652ed81ef +0 -0
- data/spec/dummy/tmp/cache/assets/CCE/C50/sprockets%2Fe12774c2fea852112414bb379a71f31a +0 -0
- data/spec/dummy/tmp/cache/assets/CD3/460/sprockets%2F7f3f6802b0b309ed142d0b671c9640c4 +0 -0
- data/spec/dummy/tmp/cache/assets/CD6/DD0/sprockets%2F301bd3b0e19eb866905681d03a891be3 +0 -0
- data/spec/dummy/tmp/cache/assets/CE0/090/sprockets%2F48d5d35ae87d0723318b8bc257fa2237 +0 -0
- data/spec/dummy/tmp/cache/assets/CE3/1F0/sprockets%2Fe69a515d3a9d14c669be8871012a7d07 +0 -0
- data/spec/dummy/tmp/cache/assets/CE4/190/sprockets%2F36c9ee4181433e33e07eb9748d218ae2 +0 -0
- data/spec/dummy/tmp/cache/assets/CE6/270/sprockets%2F2c98152560d18470fec8cf4c6829b4d0 +0 -0
- data/spec/dummy/tmp/cache/assets/CE6/7C0/sprockets%2Fa03a2c86ce6724be8542295e1cf24798 +0 -0
- data/spec/dummy/tmp/cache/assets/CE7/A60/sprockets%2Ff58eee249aa167d23f8220087bb46684 +0 -0
- data/spec/dummy/tmp/cache/assets/CE9/9E0/sprockets%2F135480d497ed7e4884462dc0ef0b80d7 +0 -0
- data/spec/dummy/tmp/cache/assets/CEB/680/sprockets%2F67f0794ef8c0576d5c7da34f4437305a +0 -0
- data/spec/dummy/tmp/cache/assets/CEB/B40/sprockets%2F1150bf8d912aa100a132251eefaf6045 +0 -0
- data/spec/dummy/tmp/cache/assets/CEC/360/sprockets%2F264b79dde726b36d63fee272a0609469 +0 -0
- data/spec/dummy/tmp/cache/assets/CEE/930/sprockets%2Fe196521e15fd8d33e3261d5538fe8f92 +0 -0
- data/spec/dummy/tmp/cache/assets/CEF/650/sprockets%2Fe859309c630f7637a53d381b327df8fd +0 -0
- data/spec/dummy/tmp/cache/assets/CEF/840/sprockets%2F16c7d195fa548e8343c6a4d2256ed778 +0 -0
- data/spec/dummy/tmp/cache/assets/CF1/C50/sprockets%2F57bd9ac92067ea01882feef075582758 +0 -0
- data/spec/dummy/tmp/cache/assets/CF3/3A0/sprockets%2F6571249b82eb52e7c7e035c692df9b69 +0 -0
- data/spec/dummy/tmp/cache/assets/CF3/C50/sprockets%2F892b968b622f37b988a1de81e09bf631 +0 -0
- data/spec/dummy/tmp/cache/assets/CF8/780/sprockets%2F8845b81ff27cdb57c835836c9f91a265 +0 -0
- data/spec/dummy/tmp/cache/assets/CFA/D20/sprockets%2Fb26796b39b3c5d6ed70be7989637a493 +0 -0
- data/spec/dummy/tmp/cache/assets/CFB/210/sprockets%2F9104695bfbf9a9d4b94382e6e90487a9 +0 -0
- data/spec/dummy/tmp/cache/assets/CFC/380/sprockets%2Fa7443cbd671446a589867dd5f4a4f989 +0 -0
- data/spec/dummy/tmp/cache/assets/D00/110/sprockets%2F6a6353b7723a8b21708e0fbfe04bd422 +0 -0
- data/spec/dummy/tmp/cache/assets/D00/F60/sprockets%2F42e279b52511c47d26c0adb125fd04e8 +0 -0
- data/spec/dummy/tmp/cache/assets/D02/570/sprockets%2F51fa8dc514e6256ae0836d5eb24e0312 +0 -0
- data/spec/dummy/tmp/cache/assets/D03/630/sprockets%2F5d8da32dba6a7be70426a1d554773701 +0 -0
- data/spec/dummy/tmp/cache/assets/D04/170/sprockets%2F76ab1dc02e6c7618852708a1e05a2df3 +0 -0
- data/spec/dummy/tmp/cache/assets/D04/480/sprockets%2F8bd8f10500b21d2f9d94e4cd1401c936 +0 -0
- data/spec/dummy/tmp/cache/assets/D05/8D0/sprockets%2F319f8f235f452343f1ebf03cb262d23d +0 -0
- data/spec/dummy/tmp/cache/assets/D09/BF0/sprockets%2F9e6bca5d26f50d9484385d51ba04312c +0 -0
- data/spec/dummy/tmp/cache/assets/D0B/210/sprockets%2Fb95ce127097fba0e4019f633e91b730d +0 -0
- data/spec/dummy/tmp/cache/assets/D0E/570/sprockets%2F90fe371bf8091e88a712124d9cdae260 +0 -0
- data/spec/dummy/tmp/cache/assets/D11/080/sprockets%2Fe202468befa786e2a3e7c6d5980b2333 +0 -0
- data/spec/dummy/tmp/cache/assets/D15/750/sprockets%2F8effdd3e668a4036260a3e370f3b6657 +0 -0
- data/spec/dummy/tmp/cache/assets/D17/710/sprockets%2Ffa49fb6823d466e79a195e0cd71340c5 +0 -0
- data/spec/dummy/tmp/cache/assets/D1D/560/sprockets%2F1ca784ee7ba1922465147e7f8963eae5 +0 -0
- data/spec/dummy/tmp/cache/assets/D1E/AA0/sprockets%2F5c8741a556bc955cd36e61c88582b6dc +0 -0
- data/spec/dummy/tmp/cache/assets/D22/4D0/sprockets%2Fe94f07f16b94d5cf185c48023f98f1b7 +0 -0
- data/spec/dummy/tmp/cache/assets/D2D/060/sprockets%2F545ec7a363badb5e7106e5112b53b26d +0 -0
- data/spec/dummy/tmp/cache/assets/D30/740/sprockets%2F4ac342b2e0244e90d08bac61f54f4f82 +0 -0
- data/spec/dummy/tmp/cache/assets/D31/9C0/sprockets%2Fbd102a4f5a4985c3519dd6ab0295a1c6 +0 -0
- data/spec/dummy/tmp/cache/assets/D35/7C0/sprockets%2Ff536a2606eaf7d542c0985104cb62baf +0 -0
- data/spec/dummy/tmp/cache/assets/D37/FF0/sprockets%2F96841ca4cfae32c515077f3f5fc303b2 +0 -0
- data/spec/dummy/tmp/cache/assets/D3C/840/sprockets%2Fc6202ec91d567a85bd3d46dc43ea9108 +0 -0
- data/spec/dummy/tmp/cache/assets/D44/0F0/sprockets%2Fc4d293b967c2e290deed3f3bd2271828 +0 -0
- data/spec/dummy/tmp/cache/assets/D44/E90/sprockets%2F05cfc0bf7c9938963d1d1c63248db80d +0 -0
- data/spec/dummy/tmp/cache/assets/D45/C30/sprockets%2Fcc744877558178a3adb77c441cadce70 +0 -0
- data/spec/dummy/tmp/cache/assets/D48/BA0/sprockets%2F30a5bfc94bac88df67501fc509b84694 +0 -0
- data/spec/dummy/tmp/cache/assets/D49/A10/sprockets%2Fc4656bd995a6f297c26d19b13aadb963 +0 -0
- data/spec/dummy/tmp/cache/assets/D4A/580/sprockets%2F19b8d8a9a57850de79b6c099fb2d010e +0 -0
- data/spec/dummy/tmp/cache/assets/D50/D70/sprockets%2Fe2a3e6c95b11e0801a4eebae3a026026 +0 -0
- data/spec/dummy/tmp/cache/assets/D51/400/sprockets%2Ff5e433d8a31e80985b75ce598de236be +0 -0
- data/spec/dummy/tmp/cache/assets/D54/D80/sprockets%2F631327e25ec20edc723046cdec3bb1c0 +0 -0
- data/spec/dummy/tmp/cache/assets/D5C/710/sprockets%2F9427d05cee2caa721241a25a9af1d08f +0 -0
- data/spec/dummy/tmp/cache/assets/D5C/CC0/sprockets%2Faa8bf6de211f2765b0a26f112b971f0c +0 -0
- data/spec/dummy/tmp/cache/assets/D61/1F0/sprockets%2F0c7a6176d2fc4db00bb9a74d36380fe1 +0 -0
- data/spec/dummy/tmp/cache/assets/D63/050/sprockets%2Fae26cd0ae2c0da97e49f6043b91008d5 +0 -0
- data/spec/dummy/tmp/cache/assets/D67/BC0/sprockets%2F35d2c2b45981ade5a2db2a9c7f37a615 +0 -0
- data/spec/dummy/tmp/cache/assets/D67/C20/sprockets%2F0d30bf27e5f74bbd85f313cb8d3c4623 +0 -0
- data/spec/dummy/tmp/cache/assets/D69/F90/sprockets%2F6a0795b7b38bd7e6142cd1b88211dade +0 -0
- data/spec/dummy/tmp/cache/assets/D6D/530/sprockets%2F8d52dee91bff01a8a2306d8a7c9152a9 +0 -0
- data/spec/dummy/tmp/cache/assets/D6D/DA0/sprockets%2Fac936bf40b42227a2bf9d474ae9ec149 +0 -0
- data/spec/dummy/tmp/cache/assets/D77/B30/sprockets%2F946cf2f17c7eb41037f9ee08ad67ec40 +0 -0
- data/spec/dummy/tmp/cache/assets/D78/2F0/sprockets%2F3c61f8915b8f717b1de788e6ecad122c +0 -0
- data/spec/dummy/tmp/cache/assets/D80/390/sprockets%2Fe44158f578d9ffade083a07f54eab729 +0 -0
- data/spec/dummy/tmp/cache/assets/D8C/520/sprockets%2F221cd58a042baac534d27e4cfedc1188 +0 -0
- data/spec/dummy/tmp/cache/assets/D93/BD0/sprockets%2Ff5e1b60201e08e3ddf8d3de5211f3d5e +0 -0
- data/spec/dummy/tmp/cache/assets/D9B/C20/sprockets%2F0e01606ddd95e451bc7d39ce0eeb664d +0 -0
- data/spec/dummy/tmp/cache/assets/DA0/330/sprockets%2Fcbbb4de706387d50f48a72ee6c9c1b80 +0 -0
- data/spec/dummy/tmp/cache/assets/DA5/0A0/sprockets%2F7a4b5928cec69ab65afff309a04d6b47 +0 -0
- data/spec/dummy/tmp/cache/assets/DAE/6C0/sprockets%2F77c7a8676aeefa73156c55dfcf51cc46 +0 -0
- data/spec/dummy/tmp/cache/assets/DAF/7C0/sprockets%2F8942514d59e7bffbfb33cde6fa9735c2 +0 -0
- data/spec/dummy/tmp/cache/assets/DB3/5D0/sprockets%2Fce1d4d75832c9bdeafd869f6f7b61725 +0 -0
- data/spec/dummy/tmp/cache/assets/DB3/D70/sprockets%2Fcc2f5e1f6eeb99c33881848cb1cde758 +0 -0
- data/spec/dummy/tmp/cache/assets/DB5/040/sprockets%2F9a9da5df88713663b9fbc945facca891 +0 -0
- data/spec/dummy/tmp/cache/assets/DC3/230/sprockets%2Fdf52e72eb73be91eccc60182191aed0b +0 -0
- data/spec/dummy/tmp/cache/assets/DC7/A10/sprockets%2F84a8af0fcbf401864e1ae5bf092cba94 +0 -0
- data/spec/dummy/tmp/cache/assets/DCD/EB0/sprockets%2F4f77f509126ecbced7ea2a5ab290c8d4 +0 -0
- data/spec/dummy/tmp/cache/assets/DD8/C10/sprockets%2Ffb91282efc9f16ebaf7e98e312ce0b73 +0 -0
- data/spec/dummy/tmp/cache/assets/DDB/EF0/sprockets%2Fe790bb18b64df8aa0a9fe94642a9edd8 +0 -0
- data/spec/dummy/tmp/cache/assets/DDD/A60/sprockets%2Fff948b6ffe44a3cc3d2d109a39f548fd +0 -0
- data/spec/dummy/tmp/cache/assets/DEB/110/sprockets%2F2dbdab0ce5babca645cdb5780004f875 +0 -0
- data/spec/dummy/tmp/cache/assets/DF6/0E0/sprockets%2F85b10db6e1afe643aba6d396abdd77f0 +0 -0
- data/spec/dummy/tmp/cache/assets/DF7/E10/sprockets%2F25e4253aba9a9adcefb72552fb1ff0c8 +0 -0
- data/spec/dummy/tmp/cache/assets/DF9/AD0/sprockets%2Fc700afd7cee3fe9d7ff8352b213b2c4a +0 -0
- data/spec/dummy/tmp/cache/assets/DFC/C20/sprockets%2Fd9178ad7e3b401c9fceafd64ea2b50d6 +0 -0
- data/spec/dummy/tmp/cache/assets/DFC/C30/sprockets%2Fb50a07cb30b0bd0eec8e98e5de79d65d +0 -0
- data/spec/dummy/tmp/cache/assets/E02/6E0/sprockets%2F63d6a5cdb8cefa64ef76b5c6e0fd3720 +0 -0
- data/spec/dummy/tmp/cache/assets/E08/BB0/sprockets%2Fefac99af1af28543aef6fb607faa4973 +0 -0
- data/spec/dummy/tmp/cache/assets/E0D/070/sprockets%2F0e7ef9a5978dcc6b1abce678ef836c0a +0 -0
- data/spec/dummy/tmp/cache/assets/E17/EF0/sprockets%2Fa291ad64a26afd055dfadabbdf03f154 +0 -0
- data/spec/dummy/tmp/cache/assets/E2F/790/sprockets%2F7fac280deaa7ef20a77d5c9b5b9cfc34 +0 -0
- data/spec/dummy/tmp/cache/assets/E37/9B0/sprockets%2F4defba98cf7befff81450e2b24e90b6d +0 -0
- data/spec/dummy/tmp/cache/assets/E41/250/sprockets%2F97cf8fe3d7ffaff076f655aefb36da03 +0 -0
- data/spec/dummy/tmp/cache/assets/E58/840/sprockets%2Fab7a15f76acfee8c320dd3cfc2a8c6d5 +0 -0
- data/spec/dummy/tmp/cache/assets/E64/1E0/sprockets%2F81ab4c863fbbdec8dd66afc97ebf034d +0 -0
- data/spec/dummy/tmp/cache/assets/E6E/260/sprockets%2Fd9f8ab8b91ef582cc6c99a3ba0dedfe6 +0 -0
- data/spec/dummy/tmp/cache/assets/E89/4C0/sprockets%2F68b2eedb3cde6fc01d50fead7caf8a18 +0 -0
- data/spec/dummy/tmp/cache/assets/F79/360/sprockets%2F0ce035fefee5ebdabc8efabfbdbd6ee4 +0 -0
- data/spec/javascripts/teabag/mocha/reporters/html_mspec.coffee +1 -1
- data/vendor/assets/javascripts/{mocha-1.8.1.MIT.LICENSE → mocha-1.9.1.MIT.LICENSE} +0 -0
- data/vendor/assets/javascripts/{mocha-1.8.1.js → mocha-1.9.1.js} +79 -81
- data/vendor/assets/javascripts/{qunit-1.10.0.MIT.LICENSE → qunit-1.11.0.MIT.LICENSE} +0 -0
- data/vendor/assets/javascripts/{qunit-1.10.0.js → qunit-1.11.0.js} +319 -144
- data/vendor/assets/javascripts/support/chai.js +721 -279
- data/vendor/assets/javascripts/support/jasmine-jquery.js +28 -2
- data/vendor/assets/javascripts/support/sinon.js +581 -435
- metadata +26 -8
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* QUnit v1.
|
2
|
+
* QUnit v1.11.0 - A JavaScript Unit Testing Framework
|
3
3
|
*
|
4
4
|
* http://qunitjs.com
|
5
5
|
*
|
@@ -12,6 +12,7 @@
|
|
12
12
|
(function( window ) {
|
13
13
|
|
14
14
|
var QUnit,
|
15
|
+
assert,
|
15
16
|
config,
|
16
17
|
onErrorFnPrev,
|
17
18
|
testId = 0,
|
@@ -32,6 +33,55 @@
|
|
32
33
|
return false;
|
33
34
|
}
|
34
35
|
}())
|
36
|
+
},
|
37
|
+
/**
|
38
|
+
* Provides a normalized error string, correcting an issue
|
39
|
+
* with IE 7 (and prior) where Error.prototype.toString is
|
40
|
+
* not properly implemented
|
41
|
+
*
|
42
|
+
* Based on http://es5.github.com/#x15.11.4.4
|
43
|
+
*
|
44
|
+
* @param {String|Error} error
|
45
|
+
* @return {String} error message
|
46
|
+
*/
|
47
|
+
errorString = function( error ) {
|
48
|
+
var name, message,
|
49
|
+
errorString = error.toString();
|
50
|
+
if ( errorString.substring( 0, 7 ) === "[object" ) {
|
51
|
+
name = error.name ? error.name.toString() : "Error";
|
52
|
+
message = error.message ? error.message.toString() : "";
|
53
|
+
if ( name && message ) {
|
54
|
+
return name + ": " + message;
|
55
|
+
} else if ( name ) {
|
56
|
+
return name;
|
57
|
+
} else if ( message ) {
|
58
|
+
return message;
|
59
|
+
} else {
|
60
|
+
return "Error";
|
61
|
+
}
|
62
|
+
} else {
|
63
|
+
return errorString;
|
64
|
+
}
|
65
|
+
},
|
66
|
+
/**
|
67
|
+
* Makes a clone of an object using only Array or Object as base,
|
68
|
+
* and copies over the own enumerable properties.
|
69
|
+
*
|
70
|
+
* @param {Object} obj
|
71
|
+
* @return {Object} New object with only the own properties (recursively).
|
72
|
+
*/
|
73
|
+
objectValues = function( obj ) {
|
74
|
+
// Grunt 0.3.x uses an older version of jshint that still has jshint/jshint#392.
|
75
|
+
/*jshint newcap: false */
|
76
|
+
var key, val,
|
77
|
+
vals = QUnit.is( "array", obj ) ? [] : {};
|
78
|
+
for ( key in obj ) {
|
79
|
+
if ( hasOwn.call( obj, key ) ) {
|
80
|
+
val = obj[key];
|
81
|
+
vals[key] = val === Object(val) ? objectValues(val) : val;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
return vals;
|
35
85
|
};
|
36
86
|
|
37
87
|
function Test( settings ) {
|
@@ -49,7 +99,7 @@
|
|
49
99
|
|
50
100
|
if ( tests ) {
|
51
101
|
b = document.createElement( "strong" );
|
52
|
-
b.innerHTML = this.
|
102
|
+
b.innerHTML = this.nameHtml;
|
53
103
|
|
54
104
|
// `a` initialized at top of scope
|
55
105
|
a = document.createElement( "a" );
|
@@ -93,6 +143,7 @@
|
|
93
143
|
teardown: function() {}
|
94
144
|
}, this.moduleTestEnvironment );
|
95
145
|
|
146
|
+
this.started = +new Date();
|
96
147
|
runLoggingCallbacks( "testStart", QUnit, {
|
97
148
|
name: this.testName,
|
98
149
|
module: this.module
|
@@ -112,7 +163,7 @@
|
|
112
163
|
try {
|
113
164
|
this.testEnvironment.setup.call( this.testEnvironment );
|
114
165
|
} catch( e ) {
|
115
|
-
QUnit.pushFailure( "Setup failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) );
|
166
|
+
QUnit.pushFailure( "Setup failed on " + this.testName + ": " + ( e.message || e ), extractStacktrace( e, 1 ) );
|
116
167
|
}
|
117
168
|
},
|
118
169
|
run: function() {
|
@@ -121,22 +172,28 @@
|
|
121
172
|
var running = id( "qunit-testresult" );
|
122
173
|
|
123
174
|
if ( running ) {
|
124
|
-
running.innerHTML = "Running: <br/>" + this.
|
175
|
+
running.innerHTML = "Running: <br/>" + this.nameHtml;
|
125
176
|
}
|
126
177
|
|
127
178
|
if ( this.async ) {
|
128
179
|
QUnit.stop();
|
129
180
|
}
|
130
181
|
|
182
|
+
this.callbackStarted = +new Date();
|
183
|
+
|
131
184
|
if ( config.notrycatch ) {
|
132
185
|
this.callback.call( this.testEnvironment, QUnit.assert );
|
186
|
+
this.callbackRuntime = +new Date() - this.callbackStarted;
|
133
187
|
return;
|
134
188
|
}
|
135
189
|
|
136
190
|
try {
|
137
191
|
this.callback.call( this.testEnvironment, QUnit.assert );
|
192
|
+
this.callbackRuntime = +new Date() - this.callbackStarted;
|
138
193
|
} catch( e ) {
|
139
|
-
|
194
|
+
this.callbackRuntime = +new Date() - this.callbackStarted;
|
195
|
+
|
196
|
+
QUnit.pushFailure( "Died on test #" + (this.assertions.length + 1) + " " + this.stack + ": " + ( e.message || e ), extractStacktrace( e, 0 ) );
|
140
197
|
// else next test will carry the responsibility
|
141
198
|
saveGlobal();
|
142
199
|
|
@@ -149,38 +206,43 @@
|
|
149
206
|
teardown: function() {
|
150
207
|
config.current = this;
|
151
208
|
if ( config.notrycatch ) {
|
209
|
+
if ( typeof this.callbackRuntime === "undefined" ) {
|
210
|
+
this.callbackRuntime = +new Date() - this.callbackStarted;
|
211
|
+
}
|
152
212
|
this.testEnvironment.teardown.call( this.testEnvironment );
|
153
213
|
return;
|
154
214
|
} else {
|
155
215
|
try {
|
156
216
|
this.testEnvironment.teardown.call( this.testEnvironment );
|
157
217
|
} catch( e ) {
|
158
|
-
QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) );
|
218
|
+
QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + ( e.message || e ), extractStacktrace( e, 1 ) );
|
159
219
|
}
|
160
220
|
}
|
161
221
|
checkPollution();
|
162
222
|
},
|
163
223
|
finish: function() {
|
164
224
|
config.current = this;
|
165
|
-
if ( config.requireExpects && this.expected
|
225
|
+
if ( config.requireExpects && this.expected === null ) {
|
166
226
|
QUnit.pushFailure( "Expected number of assertions to be defined, but expect() was not called.", this.stack );
|
167
|
-
} else if ( this.expected
|
227
|
+
} else if ( this.expected !== null && this.expected !== this.assertions.length ) {
|
168
228
|
QUnit.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run", this.stack );
|
169
|
-
} else if ( this.expected
|
229
|
+
} else if ( this.expected === null && !this.assertions.length ) {
|
170
230
|
QUnit.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.", this.stack );
|
171
231
|
}
|
172
232
|
|
173
|
-
var assertion, a, b,
|
233
|
+
var i, assertion, a, b, time, li, ol,
|
174
234
|
test = this,
|
175
235
|
good = 0,
|
176
236
|
bad = 0,
|
177
237
|
tests = id( "qunit-tests" );
|
178
238
|
|
239
|
+
this.runtime = +new Date() - this.started;
|
179
240
|
config.stats.all += this.assertions.length;
|
180
241
|
config.moduleStats.all += this.assertions.length;
|
181
242
|
|
182
243
|
if ( tests ) {
|
183
244
|
ol = document.createElement( "ol" );
|
245
|
+
ol.className = "qunit-assert-list";
|
184
246
|
|
185
247
|
for ( i = 0; i < this.assertions.length; i++ ) {
|
186
248
|
assertion = this.assertions[i];
|
@@ -209,22 +271,22 @@
|
|
209
271
|
}
|
210
272
|
|
211
273
|
if ( bad === 0 ) {
|
212
|
-
ol
|
274
|
+
addClass( ol, "qunit-collapsed" );
|
213
275
|
}
|
214
276
|
|
215
277
|
// `b` initialized at top of scope
|
216
278
|
b = document.createElement( "strong" );
|
217
|
-
b.innerHTML = this.
|
279
|
+
b.innerHTML = this.nameHtml + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>";
|
218
280
|
|
219
281
|
addEvent(b, "click", function() {
|
220
|
-
var next = b.
|
221
|
-
|
222
|
-
|
282
|
+
var next = b.parentNode.lastChild,
|
283
|
+
collapsed = hasClass( next, "qunit-collapsed" );
|
284
|
+
( collapsed ? removeClass : addClass )( next, "qunit-collapsed" );
|
223
285
|
});
|
224
286
|
|
225
287
|
addEvent(b, "dblclick", function( e ) {
|
226
288
|
var target = e && e.target ? e.target : window.event.srcElement;
|
227
|
-
if ( target.nodeName.toLowerCase()
|
289
|
+
if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) {
|
228
290
|
target = target.parentNode;
|
229
291
|
}
|
230
292
|
if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
|
@@ -232,13 +294,19 @@
|
|
232
294
|
}
|
233
295
|
});
|
234
296
|
|
297
|
+
// `time` initialized at top of scope
|
298
|
+
time = document.createElement( "span" );
|
299
|
+
time.className = "runtime";
|
300
|
+
time.innerHTML = this.runtime + " ms";
|
301
|
+
|
235
302
|
// `li` initialized at top of scope
|
236
303
|
li = id( this.id );
|
237
304
|
li.className = bad ? "fail" : "pass";
|
238
305
|
li.removeChild( li.firstChild );
|
239
306
|
a = li.firstChild;
|
240
307
|
li.appendChild( b );
|
241
|
-
li.appendChild
|
308
|
+
li.appendChild( a );
|
309
|
+
li.appendChild( time );
|
242
310
|
li.appendChild( ol );
|
243
311
|
|
244
312
|
} else {
|
@@ -256,7 +324,8 @@
|
|
256
324
|
module: this.module,
|
257
325
|
failed: bad,
|
258
326
|
passed: this.assertions.length - bad,
|
259
|
-
total: this.assertions.length
|
327
|
+
total: this.assertions.length,
|
328
|
+
duration: this.runtime
|
260
329
|
});
|
261
330
|
|
262
331
|
QUnit.reset();
|
@@ -322,7 +391,7 @@
|
|
322
391
|
|
323
392
|
test: function( testName, expected, callback, async ) {
|
324
393
|
var test,
|
325
|
-
|
394
|
+
nameHtml = "<span class='test-name'>" + escapeText( testName ) + "</span>";
|
326
395
|
|
327
396
|
if ( arguments.length === 2 ) {
|
328
397
|
callback = expected;
|
@@ -330,11 +399,11 @@
|
|
330
399
|
}
|
331
400
|
|
332
401
|
if ( config.currentModule ) {
|
333
|
-
|
402
|
+
nameHtml = "<span class='module-name'>" + escapeText( config.currentModule ) + "</span>: " + nameHtml;
|
334
403
|
}
|
335
404
|
|
336
405
|
test = new Test({
|
337
|
-
|
406
|
+
nameHtml: nameHtml,
|
338
407
|
testName: testName,
|
339
408
|
expected: expected,
|
340
409
|
async: async,
|
@@ -361,6 +430,18 @@
|
|
361
430
|
},
|
362
431
|
|
363
432
|
start: function( count ) {
|
433
|
+
// QUnit hasn't been initialized yet.
|
434
|
+
// Note: RequireJS (et al) may delay onLoad
|
435
|
+
if ( config.semaphore === undefined ) {
|
436
|
+
QUnit.begin(function() {
|
437
|
+
// This is triggered at the top of QUnit.load, push start() to the event loop, to allow QUnit.load to finish first
|
438
|
+
setTimeout(function() {
|
439
|
+
QUnit.start( count );
|
440
|
+
});
|
441
|
+
});
|
442
|
+
return;
|
443
|
+
}
|
444
|
+
|
364
445
|
config.semaphore -= count || 1;
|
365
446
|
// don't start until equal number of stop-calls
|
366
447
|
if ( config.semaphore > 0 ) {
|
@@ -369,6 +450,8 @@
|
|
369
450
|
// ignore if start is called more often then stop
|
370
451
|
if ( config.semaphore < 0 ) {
|
371
452
|
config.semaphore = 0;
|
453
|
+
QUnit.pushFailure( "Called start() while already started (QUnit.config.semaphore was 0 already)", null, sourceFromStacktrace(2) );
|
454
|
+
return;
|
372
455
|
}
|
373
456
|
// A slight delay, to avoid any current callbacks
|
374
457
|
if ( defined.setTimeout ) {
|
@@ -404,11 +487,14 @@
|
|
404
487
|
}
|
405
488
|
};
|
406
489
|
|
490
|
+
// `assert` initialized at top of scope
|
407
491
|
// Asssert helpers
|
408
|
-
// All of these must call
|
492
|
+
// All of these must either call QUnit.push() or manually do:
|
409
493
|
// - runLoggingCallbacks( "log", .. );
|
410
494
|
// - config.current.assertions.push({ .. });
|
411
|
-
|
495
|
+
// We attach it to the QUnit object *after* we expose the public API,
|
496
|
+
// otherwise `assert` will become a global variable in browsers (#341).
|
497
|
+
assert = {
|
412
498
|
/**
|
413
499
|
* Asserts rough true-ish result.
|
414
500
|
* @name ok
|
@@ -429,14 +515,14 @@
|
|
429
515
|
message: msg
|
430
516
|
};
|
431
517
|
|
432
|
-
msg =
|
518
|
+
msg = escapeText( msg || (result ? "okay" : "failed" ) );
|
433
519
|
msg = "<span class='test-message'>" + msg + "</span>";
|
434
520
|
|
435
521
|
if ( !result ) {
|
436
522
|
source = sourceFromStacktrace( 2 );
|
437
523
|
if ( source ) {
|
438
524
|
details.source = source;
|
439
|
-
msg += "<table><tr class='test-source'><th>Source: </th><td><pre>" +
|
525
|
+
msg += "<table><tr class='test-source'><th>Source: </th><td><pre>" + escapeText( source ) + "</pre></td></tr></table>";
|
440
526
|
}
|
441
527
|
}
|
442
528
|
runLoggingCallbacks( "log", QUnit, details );
|
@@ -454,6 +540,7 @@
|
|
454
540
|
* @example equal( format( "Received {0} bytes.", 2), "Received 2 bytes.", "format() replaces {0} with next argument" );
|
455
541
|
*/
|
456
542
|
equal: function( actual, expected, message ) {
|
543
|
+
/*jshint eqeqeq:false */
|
457
544
|
QUnit.push( expected == actual, actual, expected, message );
|
458
545
|
},
|
459
546
|
|
@@ -462,9 +549,30 @@
|
|
462
549
|
* @function
|
463
550
|
*/
|
464
551
|
notEqual: function( actual, expected, message ) {
|
552
|
+
/*jshint eqeqeq:false */
|
465
553
|
QUnit.push( expected != actual, actual, expected, message );
|
466
554
|
},
|
467
555
|
|
556
|
+
/**
|
557
|
+
* @name propEqual
|
558
|
+
* @function
|
559
|
+
*/
|
560
|
+
propEqual: function( actual, expected, message ) {
|
561
|
+
actual = objectValues(actual);
|
562
|
+
expected = objectValues(expected);
|
563
|
+
QUnit.push( QUnit.equiv(actual, expected), actual, expected, message );
|
564
|
+
},
|
565
|
+
|
566
|
+
/**
|
567
|
+
* @name notPropEqual
|
568
|
+
* @function
|
569
|
+
*/
|
570
|
+
notPropEqual: function( actual, expected, message ) {
|
571
|
+
actual = objectValues(actual);
|
572
|
+
expected = objectValues(expected);
|
573
|
+
QUnit.push( !QUnit.equiv(actual, expected), actual, expected, message );
|
574
|
+
},
|
575
|
+
|
468
576
|
/**
|
469
577
|
* @name deepEqual
|
470
578
|
* @function
|
@@ -497,8 +605,9 @@
|
|
497
605
|
QUnit.push( expected !== actual, actual, expected, message );
|
498
606
|
},
|
499
607
|
|
500
|
-
throws: function( block, expected, message ) {
|
608
|
+
"throws": function( block, expected, message ) {
|
501
609
|
var actual,
|
610
|
+
expectedOutput = expected,
|
502
611
|
ok = false;
|
503
612
|
|
504
613
|
// 'expected' is optional
|
@@ -519,18 +628,20 @@
|
|
519
628
|
// we don't want to validate thrown error
|
520
629
|
if ( !expected ) {
|
521
630
|
ok = true;
|
631
|
+
expectedOutput = null;
|
522
632
|
// expected is a regexp
|
523
633
|
} else if ( QUnit.objectType( expected ) === "regexp" ) {
|
524
|
-
ok = expected.test( actual );
|
634
|
+
ok = expected.test( errorString( actual ) );
|
525
635
|
// expected is a constructor
|
526
636
|
} else if ( actual instanceof expected ) {
|
527
637
|
ok = true;
|
528
638
|
// expected is a validation function which returns true is validation passed
|
529
639
|
} else if ( expected.call( {}, actual ) === true ) {
|
640
|
+
expectedOutput = null;
|
530
641
|
ok = true;
|
531
642
|
}
|
532
643
|
|
533
|
-
QUnit.push( ok, actual,
|
644
|
+
QUnit.push( ok, actual, expectedOutput, message );
|
534
645
|
} else {
|
535
646
|
QUnit.pushFailure( message, null, 'No exception was thrown.' );
|
536
647
|
}
|
@@ -539,15 +650,16 @@
|
|
539
650
|
|
540
651
|
/**
|
541
652
|
* @deprecate since 1.8.0
|
542
|
-
* Kept assertion helpers in root for backwards compatibility
|
653
|
+
* Kept assertion helpers in root for backwards compatibility.
|
543
654
|
*/
|
544
|
-
extend( QUnit,
|
655
|
+
extend( QUnit, assert );
|
545
656
|
|
546
657
|
/**
|
547
658
|
* @deprecated since 1.9.0
|
548
|
-
* Kept
|
659
|
+
* Kept root "raises()" for backwards compatibility.
|
660
|
+
* (Note that we don't introduce assert.raises).
|
549
661
|
*/
|
550
|
-
QUnit.raises =
|
662
|
+
QUnit.raises = assert[ "throws" ];
|
551
663
|
|
552
664
|
/**
|
553
665
|
* @deprecated since 1.0.0, replaced with error pushes since 1.3.0
|
@@ -623,6 +735,15 @@
|
|
623
735
|
moduleDone: []
|
624
736
|
};
|
625
737
|
|
738
|
+
// Export global variables, unless an 'exports' object exists,
|
739
|
+
// in that case we assume we're in CommonJS (dealt with on the bottom of the script)
|
740
|
+
if ( typeof exports === "undefined" ) {
|
741
|
+
extend( window, QUnit );
|
742
|
+
|
743
|
+
// Expose QUnit object
|
744
|
+
window.QUnit = QUnit;
|
745
|
+
}
|
746
|
+
|
626
747
|
// Initialize more QUnit.config and QUnit.urlParams
|
627
748
|
(function() {
|
628
749
|
var i,
|
@@ -656,18 +777,11 @@
|
|
656
777
|
QUnit.isLocal = location.protocol === "file:";
|
657
778
|
}());
|
658
779
|
|
659
|
-
// Export global variables, unless an 'exports' object exists,
|
660
|
-
// in that case we assume we're in CommonJS (dealt with on the bottom of the script)
|
661
|
-
if ( typeof exports === "undefined" ) {
|
662
|
-
extend( window, QUnit );
|
663
|
-
|
664
|
-
// Expose QUnit object
|
665
|
-
window.QUnit = QUnit;
|
666
|
-
}
|
667
|
-
|
668
780
|
// Extend QUnit object,
|
669
781
|
// these after set here because they should not be exposed as global functions
|
670
782
|
extend( QUnit, {
|
783
|
+
assert: assert,
|
784
|
+
|
671
785
|
config: config,
|
672
786
|
|
673
787
|
// Initialize the configuration options
|
@@ -682,7 +796,7 @@
|
|
682
796
|
autorun: false,
|
683
797
|
filter: "",
|
684
798
|
queue: [],
|
685
|
-
semaphore:
|
799
|
+
semaphore: 1
|
686
800
|
});
|
687
801
|
|
688
802
|
var tests, banner, result,
|
@@ -690,7 +804,7 @@
|
|
690
804
|
|
691
805
|
if ( qunit ) {
|
692
806
|
qunit.innerHTML =
|
693
|
-
"<h1 id='qunit-header'>" +
|
807
|
+
"<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
|
694
808
|
"<h2 id='qunit-banner'></h2>" +
|
695
809
|
"<div id='qunit-testrunner-toolbar'></div>" +
|
696
810
|
"<h2 id='qunit-userAgent'></h2>" +
|
@@ -746,7 +860,7 @@
|
|
746
860
|
|
747
861
|
// Safe object type checking
|
748
862
|
is: function( type, obj ) {
|
749
|
-
return QUnit.objectType( obj )
|
863
|
+
return QUnit.objectType( obj ) === type;
|
750
864
|
},
|
751
865
|
|
752
866
|
objectType: function( obj ) {
|
@@ -758,7 +872,8 @@
|
|
758
872
|
return "null";
|
759
873
|
}
|
760
874
|
|
761
|
-
var
|
875
|
+
var match = toString.call( obj ).match(/^\[object\s(.*)\]$/),
|
876
|
+
type = match && match[1] || "";
|
762
877
|
|
763
878
|
switch ( type ) {
|
764
879
|
case "Number":
|
@@ -795,16 +910,16 @@
|
|
795
910
|
expected: expected
|
796
911
|
};
|
797
912
|
|
798
|
-
message =
|
913
|
+
message = escapeText( message ) || ( result ? "okay" : "failed" );
|
799
914
|
message = "<span class='test-message'>" + message + "</span>";
|
800
915
|
output = message;
|
801
916
|
|
802
917
|
if ( !result ) {
|
803
|
-
expected =
|
804
|
-
actual =
|
918
|
+
expected = escapeText( QUnit.jsDump.parse(expected) );
|
919
|
+
actual = escapeText( QUnit.jsDump.parse(actual) );
|
805
920
|
output += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" + expected + "</pre></td></tr>";
|
806
921
|
|
807
|
-
if ( actual
|
922
|
+
if ( actual !== expected ) {
|
808
923
|
output += "<tr class='test-actual'><th>Result: </th><td><pre>" + actual + "</pre></td></tr>";
|
809
924
|
output += "<tr class='test-diff'><th>Diff: </th><td><pre>" + QUnit.diff( expected, actual ) + "</pre></td></tr>";
|
810
925
|
}
|
@@ -813,7 +928,7 @@
|
|
813
928
|
|
814
929
|
if ( source ) {
|
815
930
|
details.source = source;
|
816
|
-
output += "<tr class='test-source'><th>Source: </th><td><pre>" +
|
931
|
+
output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeText( source ) + "</pre></td></tr>";
|
817
932
|
}
|
818
933
|
|
819
934
|
output += "</table>";
|
@@ -840,19 +955,19 @@
|
|
840
955
|
message: message
|
841
956
|
};
|
842
957
|
|
843
|
-
message =
|
958
|
+
message = escapeText( message ) || "error";
|
844
959
|
message = "<span class='test-message'>" + message + "</span>";
|
845
960
|
output = message;
|
846
961
|
|
847
962
|
output += "<table>";
|
848
963
|
|
849
964
|
if ( actual ) {
|
850
|
-
output += "<tr class='test-actual'><th>Result: </th><td><pre>" +
|
965
|
+
output += "<tr class='test-actual'><th>Result: </th><td><pre>" + escapeText( actual ) + "</pre></td></tr>";
|
851
966
|
}
|
852
967
|
|
853
968
|
if ( source ) {
|
854
969
|
details.source = source;
|
855
|
-
output += "<tr class='test-source'><th>Source: </th><td><pre>" +
|
970
|
+
output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeText( source ) + "</pre></td></tr>";
|
856
971
|
}
|
857
972
|
|
858
973
|
output += "</table>";
|
@@ -877,7 +992,8 @@
|
|
877
992
|
querystring += encodeURIComponent( key ) + "=" +
|
878
993
|
encodeURIComponent( params[ key ] ) + "&";
|
879
994
|
}
|
880
|
-
return window.location.
|
995
|
+
return window.location.protocol + "//" + window.location.host +
|
996
|
+
window.location.pathname + querystring.slice( 0, -1 );
|
881
997
|
},
|
882
998
|
|
883
999
|
extend: extend,
|
@@ -908,7 +1024,7 @@
|
|
908
1024
|
// testStart: { name }
|
909
1025
|
testStart: registerLoggingCallback( "testStart" ),
|
910
1026
|
|
911
|
-
// testDone: { name, failed, passed, total }
|
1027
|
+
// testDone: { name, failed, passed, total, duration }
|
912
1028
|
testDone: registerLoggingCallback( "testDone" ),
|
913
1029
|
|
914
1030
|
// moduleStart: { name }
|
@@ -926,7 +1042,8 @@
|
|
926
1042
|
runLoggingCallbacks( "begin", QUnit, {} );
|
927
1043
|
|
928
1044
|
// Initialize the config, saving the execution queue
|
929
|
-
var banner, filter, i, label, len, main, ol, toolbar, userAgent, val,
|
1045
|
+
var banner, filter, i, label, len, main, ol, toolbar, userAgent, val,
|
1046
|
+
urlConfigCheckboxesContainer, urlConfigCheckboxes, moduleFilter,
|
930
1047
|
numModules = 0,
|
931
1048
|
moduleFilterHtml = "",
|
932
1049
|
urlConfigHtml = "",
|
@@ -949,14 +1066,24 @@
|
|
949
1066
|
};
|
950
1067
|
}
|
951
1068
|
config[ val.id ] = QUnit.urlParams[ val.id ];
|
952
|
-
urlConfigHtml += "<input id='qunit-urlconfig-" +
|
1069
|
+
urlConfigHtml += "<input id='qunit-urlconfig-" + escapeText( val.id ) +
|
1070
|
+
"' name='" + escapeText( val.id ) +
|
1071
|
+
"' type='checkbox'" + ( config[ val.id ] ? " checked='checked'" : "" ) +
|
1072
|
+
" title='" + escapeText( val.tooltip ) +
|
1073
|
+
"'><label for='qunit-urlconfig-" + escapeText( val.id ) +
|
1074
|
+
"' title='" + escapeText( val.tooltip ) + "'>" + val.label + "</label>";
|
953
1075
|
}
|
954
1076
|
|
955
|
-
moduleFilterHtml += "<label for='qunit-modulefilter'>Module: </label><select id='qunit-modulefilter' name='modulefilter'><option value='' " +
|
1077
|
+
moduleFilterHtml += "<label for='qunit-modulefilter'>Module: </label><select id='qunit-modulefilter' name='modulefilter'><option value='' " +
|
1078
|
+
( config.module === undefined ? "selected='selected'" : "" ) +
|
1079
|
+
">< All Modules ></option>";
|
1080
|
+
|
956
1081
|
for ( i in config.modules ) {
|
957
1082
|
if ( config.modules.hasOwnProperty( i ) ) {
|
958
1083
|
numModules += 1;
|
959
|
-
moduleFilterHtml += "<option value='" + encodeURIComponent(i) + "' " +
|
1084
|
+
moduleFilterHtml += "<option value='" + escapeText( encodeURIComponent(i) ) + "' " +
|
1085
|
+
( config.module === i ? "selected='selected'" : "" ) +
|
1086
|
+
">" + escapeText(i) + "</option>";
|
960
1087
|
}
|
961
1088
|
}
|
962
1089
|
moduleFilterHtml += "</select>";
|
@@ -1015,20 +1142,26 @@
|
|
1015
1142
|
label.innerHTML = "Hide passed tests";
|
1016
1143
|
toolbar.appendChild( label );
|
1017
1144
|
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1145
|
+
urlConfigCheckboxesContainer = document.createElement("span");
|
1146
|
+
urlConfigCheckboxesContainer.innerHTML = urlConfigHtml;
|
1147
|
+
urlConfigCheckboxes = urlConfigCheckboxesContainer.getElementsByTagName("input");
|
1148
|
+
// For oldIE support:
|
1149
|
+
// * Add handlers to the individual elements instead of the container
|
1150
|
+
// * Use "click" instead of "change"
|
1151
|
+
// * Fallback from event.target to event.srcElement
|
1152
|
+
addEvents( urlConfigCheckboxes, "click", function( event ) {
|
1153
|
+
var params = {},
|
1154
|
+
target = event.target || event.srcElement;
|
1155
|
+
params[ target.name ] = target.checked ? true : undefined;
|
1023
1156
|
window.location = QUnit.url( params );
|
1024
1157
|
});
|
1025
|
-
toolbar.appendChild(
|
1158
|
+
toolbar.appendChild( urlConfigCheckboxesContainer );
|
1026
1159
|
|
1027
1160
|
if (numModules > 1) {
|
1028
1161
|
moduleFilter = document.createElement( 'span' );
|
1029
1162
|
moduleFilter.setAttribute( 'id', 'qunit-modulefilter-container' );
|
1030
1163
|
moduleFilter.innerHTML = moduleFilterHtml;
|
1031
|
-
addEvent( moduleFilter, "change", function() {
|
1164
|
+
addEvent( moduleFilter.lastChild, "change", function() {
|
1032
1165
|
var selectBox = moduleFilter.getElementsByTagName("select")[0],
|
1033
1166
|
selectedModule = decodeURIComponent(selectBox.options[selectBox.selectedIndex].value);
|
1034
1167
|
|
@@ -1107,7 +1240,7 @@
|
|
1107
1240
|
" milliseconds.<br/>",
|
1108
1241
|
"<span class='passed'>",
|
1109
1242
|
passed,
|
1110
|
-
"</span>
|
1243
|
+
"</span> assertions of <span class='total'>",
|
1111
1244
|
config.stats.all,
|
1112
1245
|
"</span> passed, <span class='failed'>",
|
1113
1246
|
config.stats.bad,
|
@@ -1200,7 +1333,7 @@
|
|
1200
1333
|
function extractStacktrace( e, offset ) {
|
1201
1334
|
offset = offset === undefined ? 3 : offset;
|
1202
1335
|
|
1203
|
-
var stack, include, i
|
1336
|
+
var stack, include, i;
|
1204
1337
|
|
1205
1338
|
if ( e.stacktrace ) {
|
1206
1339
|
// Opera
|
@@ -1214,7 +1347,7 @@
|
|
1214
1347
|
if ( fileName ) {
|
1215
1348
|
include = [];
|
1216
1349
|
for ( i = offset; i < stack.length; i++ ) {
|
1217
|
-
if ( stack[ i ].indexOf( fileName )
|
1350
|
+
if ( stack[ i ].indexOf( fileName ) !== -1 ) {
|
1218
1351
|
break;
|
1219
1352
|
}
|
1220
1353
|
include.push( stack[ i ] );
|
@@ -1243,17 +1376,27 @@
|
|
1243
1376
|
}
|
1244
1377
|
}
|
1245
1378
|
|
1246
|
-
|
1379
|
+
/**
|
1380
|
+
* Escape text for attribute or text content.
|
1381
|
+
*/
|
1382
|
+
function escapeText( s ) {
|
1247
1383
|
if ( !s ) {
|
1248
1384
|
return "";
|
1249
1385
|
}
|
1250
1386
|
s = s + "";
|
1251
|
-
|
1387
|
+
// Both single quotes and double quotes (for attributes)
|
1388
|
+
return s.replace( /['"<>&]/g, function( s ) {
|
1252
1389
|
switch( s ) {
|
1253
|
-
case
|
1254
|
-
|
1255
|
-
case "
|
1256
|
-
|
1390
|
+
case '\'':
|
1391
|
+
return ''';
|
1392
|
+
case '"':
|
1393
|
+
return '"';
|
1394
|
+
case '<':
|
1395
|
+
return '<';
|
1396
|
+
case '>':
|
1397
|
+
return '>';
|
1398
|
+
case '&':
|
1399
|
+
return '&';
|
1257
1400
|
}
|
1258
1401
|
});
|
1259
1402
|
}
|
@@ -1301,7 +1444,7 @@
|
|
1301
1444
|
}
|
1302
1445
|
}
|
1303
1446
|
|
1304
|
-
function checkPollution(
|
1447
|
+
function checkPollution() {
|
1305
1448
|
var newGlobals,
|
1306
1449
|
deletedGlobals,
|
1307
1450
|
old = config.pollution;
|
@@ -1350,16 +1493,53 @@
|
|
1350
1493
|
return a;
|
1351
1494
|
}
|
1352
1495
|
|
1496
|
+
/**
|
1497
|
+
* @param {HTMLElement} elem
|
1498
|
+
* @param {string} type
|
1499
|
+
* @param {Function} fn
|
1500
|
+
*/
|
1353
1501
|
function addEvent( elem, type, fn ) {
|
1502
|
+
// Standards-based browsers
|
1354
1503
|
if ( elem.addEventListener ) {
|
1355
1504
|
elem.addEventListener( type, fn, false );
|
1356
|
-
|
1357
|
-
elem.attachEvent( "on" + type, fn );
|
1505
|
+
// IE
|
1358
1506
|
} else {
|
1359
|
-
fn
|
1507
|
+
elem.attachEvent( "on" + type, fn );
|
1360
1508
|
}
|
1361
1509
|
}
|
1362
1510
|
|
1511
|
+
/**
|
1512
|
+
* @param {Array|NodeList} elems
|
1513
|
+
* @param {string} type
|
1514
|
+
* @param {Function} fn
|
1515
|
+
*/
|
1516
|
+
function addEvents( elems, type, fn ) {
|
1517
|
+
var i = elems.length;
|
1518
|
+
while ( i-- ) {
|
1519
|
+
addEvent( elems[i], type, fn );
|
1520
|
+
}
|
1521
|
+
}
|
1522
|
+
|
1523
|
+
function hasClass( elem, name ) {
|
1524
|
+
return (" " + elem.className + " ").indexOf(" " + name + " ") > -1;
|
1525
|
+
}
|
1526
|
+
|
1527
|
+
function addClass( elem, name ) {
|
1528
|
+
if ( !hasClass( elem, name ) ) {
|
1529
|
+
elem.className += (elem.className ? " " : "") + name;
|
1530
|
+
}
|
1531
|
+
}
|
1532
|
+
|
1533
|
+
function removeClass( elem, name ) {
|
1534
|
+
var set = " " + elem.className + " ";
|
1535
|
+
// Class name may appear multiple times
|
1536
|
+
while ( set.indexOf(" " + name + " ") > -1 ) {
|
1537
|
+
set = set.replace(" " + name + " " , " ");
|
1538
|
+
}
|
1539
|
+
// If possible, trim it for prettiness, but not neccecarily
|
1540
|
+
elem.className = window.jQuery ? jQuery.trim( set ) : ( set.trim ? set.trim() : set );
|
1541
|
+
}
|
1542
|
+
|
1363
1543
|
function id( name ) {
|
1364
1544
|
return !!( typeof document !== "undefined" && document && document.getElementById ) &&
|
1365
1545
|
document.getElementById( name );
|
@@ -1373,7 +1553,6 @@
|
|
1373
1553
|
|
1374
1554
|
// Supports deprecated method of completely overwriting logging callbacks
|
1375
1555
|
function runLoggingCallbacks( key, scope, args ) {
|
1376
|
-
//debugger;
|
1377
1556
|
var i, callbacks;
|
1378
1557
|
if ( QUnit.hasOwnProperty( key ) ) {
|
1379
1558
|
QUnit[ key ].call(scope, args );
|
@@ -1415,6 +1594,7 @@
|
|
1415
1594
|
|
1416
1595
|
// for string, boolean, number and null
|
1417
1596
|
function useStrictEquality( b, a ) {
|
1597
|
+
/*jshint eqeqeq:false */
|
1418
1598
|
if ( b instanceof a.constructor || a instanceof b.constructor ) {
|
1419
1599
|
// to catch short annotaion VS 'new' annotation of a
|
1420
1600
|
// declaration
|
@@ -1611,7 +1791,8 @@
|
|
1611
1791
|
|
1612
1792
|
var reName = /^function (\w+)/,
|
1613
1793
|
jsDump = {
|
1614
|
-
|
1794
|
+
// type is used mostly internally, you can fix a (custom)type in advance
|
1795
|
+
parse: function( obj, type, stack ) {
|
1615
1796
|
stack = stack || [ ];
|
1616
1797
|
var inStack, res,
|
1617
1798
|
parser = this.parsers[ type || this.typeOf(obj) ];
|
@@ -1619,18 +1800,16 @@
|
|
1619
1800
|
type = typeof parser;
|
1620
1801
|
inStack = inArray( obj, stack );
|
1621
1802
|
|
1622
|
-
if ( inStack
|
1803
|
+
if ( inStack !== -1 ) {
|
1623
1804
|
return "recursion(" + (inStack - stack.length) + ")";
|
1624
1805
|
}
|
1625
|
-
|
1626
|
-
if ( type == "function" ) {
|
1806
|
+
if ( type === "function" ) {
|
1627
1807
|
stack.push( obj );
|
1628
1808
|
res = parser.call( this, obj, stack );
|
1629
1809
|
stack.pop();
|
1630
1810
|
return res;
|
1631
1811
|
}
|
1632
|
-
|
1633
|
-
return ( type == "string" ) ? parser : this.parsers.error;
|
1812
|
+
return ( type === "string" ) ? parser : this.parsers.error;
|
1634
1813
|
},
|
1635
1814
|
typeOf: function( obj ) {
|
1636
1815
|
var type;
|
@@ -1657,6 +1836,8 @@
|
|
1657
1836
|
( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) )
|
1658
1837
|
) {
|
1659
1838
|
type = "array";
|
1839
|
+
} else if ( obj.constructor === Error.prototype.constructor ) {
|
1840
|
+
type = "error";
|
1660
1841
|
} else {
|
1661
1842
|
type = typeof obj;
|
1662
1843
|
}
|
@@ -1665,7 +1846,8 @@
|
|
1665
1846
|
separator: function() {
|
1666
1847
|
return this.multiline ? this.HTML ? "<br />" : "\n" : this.HTML ? " " : " ";
|
1667
1848
|
},
|
1668
|
-
|
1849
|
+
// extra can be a number, shortcut for increasing-calling-decreasing
|
1850
|
+
indent: function( extra ) {
|
1669
1851
|
if ( !this.multiline ) {
|
1670
1852
|
return "";
|
1671
1853
|
}
|
@@ -1694,13 +1876,16 @@
|
|
1694
1876
|
parsers: {
|
1695
1877
|
window: "[Window]",
|
1696
1878
|
document: "[Document]",
|
1697
|
-
error:
|
1879
|
+
error: function(error) {
|
1880
|
+
return "Error(\"" + error.message + "\")";
|
1881
|
+
},
|
1698
1882
|
unknown: "[Unknown]",
|
1699
1883
|
"null": "null",
|
1700
1884
|
"undefined": "undefined",
|
1701
1885
|
"function": function( fn ) {
|
1702
1886
|
var ret = "function",
|
1703
|
-
|
1887
|
+
// functions never have name in IE
|
1888
|
+
name = "name" in fn ? fn.name : (reName.exec(fn) || [])[1];
|
1704
1889
|
|
1705
1890
|
if ( name ) {
|
1706
1891
|
ret += " " + name;
|
@@ -1716,13 +1901,9 @@
|
|
1716
1901
|
object: function( map, stack ) {
|
1717
1902
|
var ret = [ ], keys, key, val, i;
|
1718
1903
|
QUnit.jsDump.up();
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
keys = [];
|
1723
|
-
for ( key in map ) {
|
1724
|
-
keys.push( key );
|
1725
|
-
}
|
1904
|
+
keys = [];
|
1905
|
+
for ( key in map ) {
|
1906
|
+
keys.push( key );
|
1726
1907
|
}
|
1727
1908
|
keys.sort();
|
1728
1909
|
for ( i = 0; i < keys.length; i++ ) {
|
@@ -1734,21 +1915,34 @@
|
|
1734
1915
|
return join( "{", ret, "}" );
|
1735
1916
|
},
|
1736
1917
|
node: function( node ) {
|
1737
|
-
var
|
1918
|
+
var len, i, val,
|
1738
1919
|
open = QUnit.jsDump.HTML ? "<" : "<",
|
1739
1920
|
close = QUnit.jsDump.HTML ? ">" : ">",
|
1740
1921
|
tag = node.nodeName.toLowerCase(),
|
1741
|
-
ret = open + tag
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1922
|
+
ret = open + tag,
|
1923
|
+
attrs = node.attributes;
|
1924
|
+
|
1925
|
+
if ( attrs ) {
|
1926
|
+
for ( i = 0, len = attrs.length; i < len; i++ ) {
|
1927
|
+
val = attrs[i].nodeValue;
|
1928
|
+
// IE6 includes all attributes in .attributes, even ones not explicitly set.
|
1929
|
+
// Those have values like undefined, null, 0, false, "" or "inherit".
|
1930
|
+
if ( val && val !== "inherit" ) {
|
1931
|
+
ret += " " + attrs[i].nodeName + "=" + QUnit.jsDump.parse( val, "attribute" );
|
1932
|
+
}
|
1747
1933
|
}
|
1748
1934
|
}
|
1749
|
-
|
1935
|
+
ret += close;
|
1936
|
+
|
1937
|
+
// Show content of TextNode or CDATASection
|
1938
|
+
if ( node.nodeType === 3 || node.nodeType === 4 ) {
|
1939
|
+
ret += node.nodeValue;
|
1940
|
+
}
|
1941
|
+
|
1942
|
+
return ret + open + "/" + tag + close;
|
1750
1943
|
},
|
1751
|
-
|
1944
|
+
// function calls it internally, it's the arguments part of the function
|
1945
|
+
functionArgs: function( fn ) {
|
1752
1946
|
var args,
|
1753
1947
|
l = fn.length;
|
1754
1948
|
|
@@ -1758,54 +1952,34 @@
|
|
1758
1952
|
|
1759
1953
|
args = new Array(l);
|
1760
1954
|
while ( l-- ) {
|
1761
|
-
|
1955
|
+
// 97 is 'a'
|
1956
|
+
args[l] = String.fromCharCode(97+l);
|
1762
1957
|
}
|
1763
1958
|
return " " + args.join( ", " ) + " ";
|
1764
1959
|
},
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1960
|
+
// object calls it internally, the key part of an item in a map
|
1961
|
+
key: quote,
|
1962
|
+
// function calls it internally, it's the content of the function
|
1963
|
+
functionCode: "[code]",
|
1964
|
+
// node calls it internally, it's an html attribute value
|
1965
|
+
attribute: quote,
|
1768
1966
|
string: quote,
|
1769
1967
|
date: quote,
|
1770
|
-
regexp: literal,
|
1968
|
+
regexp: literal,
|
1771
1969
|
number: literal,
|
1772
1970
|
"boolean": literal
|
1773
1971
|
},
|
1774
|
-
|
1775
|
-
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
HTML: false,//if true, entities are escaped ( <, >, \t, space and \n )
|
1781
|
-
indentChar: " ",//indentation unit
|
1782
|
-
multiline: true //if true, items in a collection, are separated by a \n, else just a space.
|
1972
|
+
// if true, entities are escaped ( <, >, \t, space and \n )
|
1973
|
+
HTML: false,
|
1974
|
+
// indentation unit
|
1975
|
+
indentChar: " ",
|
1976
|
+
// if true, items in a collection, are separated by a \n, else just a space.
|
1977
|
+
multiline: true
|
1783
1978
|
};
|
1784
1979
|
|
1785
1980
|
return jsDump;
|
1786
1981
|
}());
|
1787
1982
|
|
1788
|
-
// from Sizzle.js
|
1789
|
-
function getText( elems ) {
|
1790
|
-
var i, elem,
|
1791
|
-
ret = "";
|
1792
|
-
|
1793
|
-
for ( i = 0; elems[i]; i++ ) {
|
1794
|
-
elem = elems[i];
|
1795
|
-
|
1796
|
-
// Get the text from text nodes and CDATA nodes
|
1797
|
-
if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
|
1798
|
-
ret += elem.nodeValue;
|
1799
|
-
|
1800
|
-
// Traverse everything else, except comment nodes
|
1801
|
-
} else if ( elem.nodeType !== 8 ) {
|
1802
|
-
ret += getText( elem.childNodes );
|
1803
|
-
}
|
1804
|
-
}
|
1805
|
-
|
1806
|
-
return ret;
|
1807
|
-
}
|
1808
|
-
|
1809
1983
|
// from jquery.js
|
1810
1984
|
function inArray( elem, array ) {
|
1811
1985
|
if ( array.indexOf ) {
|
@@ -1836,13 +2010,14 @@
|
|
1836
2010
|
* QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
|
1837
2011
|
*/
|
1838
2012
|
QUnit.diff = (function() {
|
2013
|
+
/*jshint eqeqeq:false, eqnull:true */
|
1839
2014
|
function diff( o, n ) {
|
1840
2015
|
var i,
|
1841
2016
|
ns = {},
|
1842
2017
|
os = {};
|
1843
2018
|
|
1844
2019
|
for ( i = 0; i < n.length; i++ ) {
|
1845
|
-
if ( ns
|
2020
|
+
if ( !hasOwn.call( ns, n[i] ) ) {
|
1846
2021
|
ns[ n[i] ] = {
|
1847
2022
|
rows: [],
|
1848
2023
|
o: null
|
@@ -1852,7 +2027,7 @@
|
|
1852
2027
|
}
|
1853
2028
|
|
1854
2029
|
for ( i = 0; i < o.length; i++ ) {
|
1855
|
-
if ( os
|
2030
|
+
if ( !hasOwn.call( os, o[i] ) ) {
|
1856
2031
|
os[ o[i] ] = {
|
1857
2032
|
rows: [],
|
1858
2033
|
n: null
|
@@ -1865,7 +2040,7 @@
|
|
1865
2040
|
if ( !hasOwn.call( ns, i ) ) {
|
1866
2041
|
continue;
|
1867
2042
|
}
|
1868
|
-
if ( ns[i].rows.length
|
2043
|
+
if ( ns[i].rows.length === 1 && hasOwn.call( os, i ) && os[i].rows.length === 1 ) {
|
1869
2044
|
n[ ns[i].rows[0] ] = {
|
1870
2045
|
text: n[ ns[i].rows[0] ],
|
1871
2046
|
row: os[i].rows[0]
|
@@ -1971,15 +2146,13 @@
|
|
1971
2146
|
|
1972
2147
|
// for CommonJS enviroments, export everything
|
1973
2148
|
if ( typeof exports !== "undefined" ) {
|
1974
|
-
extend(exports, QUnit);
|
2149
|
+
extend( exports, QUnit );
|
1975
2150
|
}
|
1976
2151
|
|
1977
2152
|
// get at whatever the global object is, like window in browsers
|
1978
2153
|
}( (function() {return this;}.call()) ));
|
1979
2154
|
(function() {
|
1980
|
-
|
1981
2155
|
this.Teabag = (function() {
|
1982
|
-
|
1983
2156
|
function Teabag() {}
|
1984
2157
|
|
1985
2158
|
Teabag.defer = false;
|
@@ -2011,6 +2184,7 @@
|
|
2011
2184
|
|
2012
2185
|
Teabag.resolveDependenciesFromParams = function(all) {
|
2013
2186
|
var dep, deps, file, parts, path, paths, _i, _j, _len, _len1;
|
2187
|
+
|
2014
2188
|
if (all == null) {
|
2015
2189
|
all = [];
|
2016
2190
|
}
|
@@ -2036,16 +2210,20 @@
|
|
2036
2210
|
};
|
2037
2211
|
|
2038
2212
|
Teabag.log = function() {
|
2213
|
+
var e;
|
2214
|
+
|
2039
2215
|
this.messages.push(arguments[0]);
|
2040
2216
|
try {
|
2041
2217
|
return console.log.apply(console, arguments);
|
2042
|
-
} catch (
|
2218
|
+
} catch (_error) {
|
2219
|
+
e = _error;
|
2043
2220
|
throw new Error("Unable to use console.log for logging");
|
2044
2221
|
}
|
2045
2222
|
};
|
2046
2223
|
|
2047
2224
|
Teabag.getMessages = function() {
|
2048
2225
|
var messages;
|
2226
|
+
|
2049
2227
|
messages = this.messages;
|
2050
2228
|
this.messages = [];
|
2051
2229
|
return messages;
|
@@ -2057,9 +2235,7 @@
|
|
2057
2235
|
|
2058
2236
|
}).call(this);
|
2059
2237
|
(function() {
|
2060
|
-
|
2061
2238
|
Teabag.Runner = (function() {
|
2062
|
-
|
2063
2239
|
Runner.run = false;
|
2064
2240
|
|
2065
2241
|
function Runner() {
|
@@ -2074,6 +2250,7 @@
|
|
2074
2250
|
|
2075
2251
|
Runner.prototype.getParams = function() {
|
2076
2252
|
var name, param, params, value, _i, _len, _ref, _ref1;
|
2253
|
+
|
2077
2254
|
params = {};
|
2078
2255
|
_ref = Teabag.location.search.substring(1).split("&");
|
2079
2256
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
@@ -2120,6 +2297,7 @@
|
|
2120
2297
|
|
2121
2298
|
fixture.preload = function() {
|
2122
2299
|
var url, urls, _i, _len, _results;
|
2300
|
+
|
2123
2301
|
urls = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
|
2124
2302
|
_results = [];
|
2125
2303
|
for (_i = 0, _len = urls.length; _i < _len; _i++) {
|
@@ -2131,6 +2309,7 @@
|
|
2131
2309
|
|
2132
2310
|
fixture.load = function() {
|
2133
2311
|
var append, index, url, urls, _i, _j, _len, _results;
|
2312
|
+
|
2134
2313
|
urls = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), append = arguments[_i++];
|
2135
2314
|
if (append == null) {
|
2136
2315
|
append = false;
|
@@ -2149,6 +2328,7 @@
|
|
2149
2328
|
|
2150
2329
|
fixture.set = function() {
|
2151
2330
|
var append, html, htmls, index, _i, _j, _len, _results;
|
2331
|
+
|
2152
2332
|
htmls = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), append = arguments[_i++];
|
2153
2333
|
if (append == null) {
|
2154
2334
|
append = false;
|
@@ -2181,6 +2361,7 @@
|
|
2181
2361
|
|
2182
2362
|
load = function(url, append, preload) {
|
2183
2363
|
var cached, value;
|
2364
|
+
|
2184
2365
|
if (preload == null) {
|
2185
2366
|
preload = false;
|
2186
2367
|
}
|
@@ -2242,6 +2423,7 @@
|
|
2242
2423
|
|
2243
2424
|
create = function() {
|
2244
2425
|
var _ref;
|
2426
|
+
|
2245
2427
|
Teabag.fixture.el = document.createElement("div");
|
2246
2428
|
if (typeof window.$ === 'function') {
|
2247
2429
|
Teabag.fixture.$el = $(Teabag.fixture.el);
|
@@ -2252,6 +2434,7 @@
|
|
2252
2434
|
|
2253
2435
|
cleanup = function() {
|
2254
2436
|
var _base, _ref, _ref1;
|
2437
|
+
|
2255
2438
|
(_base = Teabag.fixture).el || (_base.el = document.getElementById("teabag-fixtures"));
|
2256
2439
|
if ((_ref = Teabag.fixture.el) != null) {
|
2257
2440
|
if ((_ref1 = _ref.parentNode) != null) {
|
@@ -2262,16 +2445,19 @@
|
|
2262
2445
|
};
|
2263
2446
|
|
2264
2447
|
xhrRequest = function(url, callback) {
|
2448
|
+
var e;
|
2449
|
+
|
2265
2450
|
if (window.XMLHttpRequest) {
|
2266
2451
|
xhr = new XMLHttpRequest();
|
2267
2452
|
} else if (window.ActiveXObject) {
|
2268
2453
|
try {
|
2269
2454
|
xhr = new ActiveXObject("Msxml2.XMLHTTP");
|
2270
|
-
} catch (
|
2455
|
+
} catch (_error) {
|
2456
|
+
e = _error;
|
2271
2457
|
try {
|
2272
2458
|
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
2273
|
-
} catch (
|
2274
|
-
|
2459
|
+
} catch (_error) {
|
2460
|
+
e = _error;
|
2275
2461
|
}
|
2276
2462
|
}
|
2277
2463
|
}
|
@@ -2289,9 +2475,7 @@
|
|
2289
2475
|
|
2290
2476
|
}).call(this);
|
2291
2477
|
(function() {
|
2292
|
-
|
2293
2478
|
Teabag.Reporters.BaseView = (function() {
|
2294
|
-
|
2295
2479
|
function BaseView() {
|
2296
2480
|
this.elements = {};
|
2297
2481
|
this.build();
|
@@ -2311,6 +2495,7 @@
|
|
2311
2495
|
|
2312
2496
|
BaseView.prototype.createEl = function(type, className) {
|
2313
2497
|
var el;
|
2498
|
+
|
2314
2499
|
if (className == null) {
|
2315
2500
|
className = "";
|
2316
2501
|
}
|
@@ -2321,18 +2506,21 @@
|
|
2321
2506
|
|
2322
2507
|
BaseView.prototype.findEl = function(id) {
|
2323
2508
|
var _base;
|
2509
|
+
|
2324
2510
|
this.elements || (this.elements = {});
|
2325
2511
|
return (_base = this.elements)[id] || (_base[id] = document.getElementById("teabag-" + id));
|
2326
2512
|
};
|
2327
2513
|
|
2328
2514
|
BaseView.prototype.setText = function(id, value) {
|
2329
2515
|
var el;
|
2516
|
+
|
2330
2517
|
el = this.findEl(id);
|
2331
2518
|
return el.innerHTML = value;
|
2332
2519
|
};
|
2333
2520
|
|
2334
2521
|
BaseView.prototype.setHtml = function(id, value, add) {
|
2335
2522
|
var el;
|
2523
|
+
|
2336
2524
|
if (add == null) {
|
2337
2525
|
add = false;
|
2338
2526
|
}
|
@@ -2346,12 +2534,14 @@
|
|
2346
2534
|
|
2347
2535
|
BaseView.prototype.setClass = function(id, value) {
|
2348
2536
|
var el;
|
2537
|
+
|
2349
2538
|
el = this.findEl(id);
|
2350
2539
|
return el.className = value;
|
2351
2540
|
};
|
2352
2541
|
|
2353
2542
|
BaseView.prototype.htmlSafe = function(str) {
|
2354
2543
|
var el;
|
2544
|
+
|
2355
2545
|
el = document.createElement("div");
|
2356
2546
|
el.appendChild(document.createTextNode(str));
|
2357
2547
|
return el.innerHTML;
|
@@ -2368,14 +2558,11 @@
|
|
2368
2558
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
2369
2559
|
|
2370
2560
|
Teabag.Reporters.HTML = (function(_super) {
|
2371
|
-
|
2372
2561
|
__extends(HTML, _super);
|
2373
2562
|
|
2374
2563
|
function HTML() {
|
2375
2564
|
this.toggleConfig = __bind(this.toggleConfig, this);
|
2376
|
-
|
2377
|
-
this.reportRunnerResults = __bind(this.reportRunnerResults, this);
|
2378
|
-
this.start = new Teabag.Date().getTime();
|
2565
|
+
this.reportRunnerResults = __bind(this.reportRunnerResults, this); this.start = new Teabag.Date().getTime();
|
2379
2566
|
this.config = {
|
2380
2567
|
"use-catch": true,
|
2381
2568
|
"build-full-report": false,
|
@@ -2400,6 +2587,7 @@
|
|
2400
2587
|
|
2401
2588
|
HTML.prototype.build = function() {
|
2402
2589
|
var _ref;
|
2590
|
+
|
2403
2591
|
this.buildLayout();
|
2404
2592
|
this.setText("env-info", this.envInfo());
|
2405
2593
|
this.setText("version", Teabag.version);
|
@@ -2417,6 +2605,7 @@
|
|
2417
2605
|
|
2418
2606
|
HTML.prototype.buildLayout = function() {
|
2419
2607
|
var el;
|
2608
|
+
|
2420
2609
|
el = this.createEl("div");
|
2421
2610
|
el.id = "teabag-interface";
|
2422
2611
|
el.innerHTML = Teabag.Reporters.HTML.template;
|
@@ -2425,6 +2614,7 @@
|
|
2425
2614
|
|
2426
2615
|
HTML.prototype.buildSuiteSelect = function() {
|
2427
2616
|
var options, suite, _i, _len, _ref;
|
2617
|
+
|
2428
2618
|
if (Teabag.suites.all.length === 1) {
|
2429
2619
|
return "";
|
2430
2620
|
}
|
@@ -2501,6 +2691,7 @@
|
|
2501
2691
|
|
2502
2692
|
HTML.prototype.updateStatus = function(spec) {
|
2503
2693
|
var elapsed, result, _ref, _ref1;
|
2694
|
+
|
2504
2695
|
spec = new Teabag.Spec(spec);
|
2505
2696
|
result = spec.result();
|
2506
2697
|
if (result.skipped || result.status === "pending") {
|
@@ -2529,6 +2720,7 @@
|
|
2529
2720
|
|
2530
2721
|
HTML.prototype.showConfiguration = function() {
|
2531
2722
|
var key, value, _ref, _results;
|
2723
|
+
|
2532
2724
|
_ref = this.config;
|
2533
2725
|
_results = [];
|
2534
2726
|
for (key in _ref) {
|
@@ -2544,6 +2736,7 @@
|
|
2544
2736
|
|
2545
2737
|
HTML.prototype.setFilters = function() {
|
2546
2738
|
var link;
|
2739
|
+
|
2547
2740
|
link = [Teabag.root, Teabag.suites.active].join('/');
|
2548
2741
|
if (Teabag.params["file"]) {
|
2549
2742
|
this.filters.push("<a href='" + link + "'>remove</a> by file: " + Teabag.params["file"]);
|
@@ -2555,6 +2748,7 @@
|
|
2555
2748
|
|
2556
2749
|
HTML.prototype.readConfig = function() {
|
2557
2750
|
var config;
|
2751
|
+
|
2558
2752
|
if (config = this.cookie("teabag")) {
|
2559
2753
|
return this.config = config;
|
2560
2754
|
}
|
@@ -2562,6 +2756,7 @@
|
|
2562
2756
|
|
2563
2757
|
HTML.prototype.toggleConfig = function(e) {
|
2564
2758
|
var button, name;
|
2759
|
+
|
2565
2760
|
button = e.target;
|
2566
2761
|
if (button.tagName.toLowerCase() !== "button") {
|
2567
2762
|
return;
|
@@ -2582,6 +2777,7 @@
|
|
2582
2777
|
|
2583
2778
|
HTML.prototype.cookie = function(name, value) {
|
2584
2779
|
var date, match;
|
2780
|
+
|
2585
2781
|
if (value == null) {
|
2586
2782
|
value = void 0;
|
2587
2783
|
}
|
@@ -2602,15 +2798,16 @@
|
|
2602
2798
|
|
2603
2799
|
}).call(this);
|
2604
2800
|
(function() {
|
2605
|
-
var
|
2801
|
+
var _ref, _ref1, _ref2,
|
2802
|
+
__hasProp = {}.hasOwnProperty,
|
2606
2803
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
2607
2804
|
|
2608
2805
|
Teabag.Reporters.HTML.ProgressView = (function(_super) {
|
2609
|
-
|
2610
2806
|
__extends(ProgressView, _super);
|
2611
2807
|
|
2612
2808
|
function ProgressView() {
|
2613
|
-
|
2809
|
+
_ref = ProgressView.__super__.constructor.apply(this, arguments);
|
2810
|
+
return _ref;
|
2614
2811
|
}
|
2615
2812
|
|
2616
2813
|
ProgressView.create = function(displayProgress) {
|
@@ -2638,11 +2835,11 @@
|
|
2638
2835
|
})(Teabag.Reporters.BaseView);
|
2639
2836
|
|
2640
2837
|
Teabag.Reporters.HTML.SimpleProgressView = (function(_super) {
|
2641
|
-
|
2642
2838
|
__extends(SimpleProgressView, _super);
|
2643
2839
|
|
2644
2840
|
function SimpleProgressView() {
|
2645
|
-
|
2841
|
+
_ref1 = SimpleProgressView.__super__.constructor.apply(this, arguments);
|
2842
|
+
return _ref1;
|
2646
2843
|
}
|
2647
2844
|
|
2648
2845
|
SimpleProgressView.prototype.build = function() {
|
@@ -2652,6 +2849,7 @@
|
|
2652
2849
|
|
2653
2850
|
SimpleProgressView.prototype.update = function(total, run) {
|
2654
2851
|
var percent;
|
2852
|
+
|
2655
2853
|
percent = total ? Math.ceil((run * 100) / total) : 0;
|
2656
2854
|
return this.setHtml("progress-percent", "" + percent + "%");
|
2657
2855
|
};
|
@@ -2661,11 +2859,11 @@
|
|
2661
2859
|
})(Teabag.Reporters.HTML.ProgressView);
|
2662
2860
|
|
2663
2861
|
Teabag.Reporters.HTML.RadialProgressView = (function(_super) {
|
2664
|
-
|
2665
2862
|
__extends(RadialProgressView, _super);
|
2666
2863
|
|
2667
2864
|
function RadialProgressView() {
|
2668
|
-
|
2865
|
+
_ref2 = RadialProgressView.__super__.constructor.apply(this, arguments);
|
2866
|
+
return _ref2;
|
2669
2867
|
}
|
2670
2868
|
|
2671
2869
|
RadialProgressView.supported = !!document.createElement("canvas").getContext;
|
@@ -2676,7 +2874,8 @@
|
|
2676
2874
|
};
|
2677
2875
|
|
2678
2876
|
RadialProgressView.prototype.appendTo = function() {
|
2679
|
-
var canvas;
|
2877
|
+
var canvas, e;
|
2878
|
+
|
2680
2879
|
RadialProgressView.__super__.appendTo.apply(this, arguments);
|
2681
2880
|
this.size = 80;
|
2682
2881
|
try {
|
@@ -2685,13 +2884,14 @@
|
|
2685
2884
|
this.ctx = canvas.getContext("2d");
|
2686
2885
|
this.ctx.strokeStyle = "#fff";
|
2687
2886
|
return this.ctx.lineWidth = 1.5;
|
2688
|
-
} catch (
|
2689
|
-
|
2887
|
+
} catch (_error) {
|
2888
|
+
e = _error;
|
2690
2889
|
}
|
2691
2890
|
};
|
2692
2891
|
|
2693
2892
|
RadialProgressView.prototype.update = function(total, run) {
|
2694
2893
|
var half, percent;
|
2894
|
+
|
2695
2895
|
percent = total ? Math.ceil((run * 100) / total) : 0;
|
2696
2896
|
this.setHtml("progress-percent", "" + percent + "%");
|
2697
2897
|
if (!this.ctx) {
|
@@ -2731,6 +2931,7 @@
|
|
2731
2931
|
|
2732
2932
|
SpecView.prototype.build = function() {
|
2733
2933
|
var classes;
|
2934
|
+
|
2734
2935
|
classes = ["spec"];
|
2735
2936
|
if (this.spec.pending) {
|
2736
2937
|
classes.push("state-pending");
|
@@ -2743,6 +2944,7 @@
|
|
2743
2944
|
|
2744
2945
|
SpecView.prototype.buildParent = function() {
|
2745
2946
|
var parent, view;
|
2947
|
+
|
2746
2948
|
parent = this.spec.parent;
|
2747
2949
|
if (parent.viewId) {
|
2748
2950
|
return this.views.suites[parent.viewId];
|
@@ -2754,6 +2956,7 @@
|
|
2754
2956
|
|
2755
2957
|
SpecView.prototype.buildErrors = function() {
|
2756
2958
|
var div, error, html, _i, _len, _ref;
|
2959
|
+
|
2757
2960
|
div = this.createEl("div");
|
2758
2961
|
html = "";
|
2759
2962
|
_ref = this.spec.errors();
|
@@ -2767,6 +2970,7 @@
|
|
2767
2970
|
|
2768
2971
|
SpecView.prototype.updateState = function(state, elapsed) {
|
2769
2972
|
var classes, result, _base;
|
2973
|
+
|
2770
2974
|
result = this.spec.result();
|
2771
2975
|
classes = ["state-" + state];
|
2772
2976
|
if (elapsed > Teabag.slow) {
|
@@ -2792,7 +2996,6 @@
|
|
2792
2996
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
2793
2997
|
|
2794
2998
|
Teabag.Reporters.HTML.FailureView = (function(_super) {
|
2795
|
-
|
2796
2999
|
__extends(FailureView, _super);
|
2797
3000
|
|
2798
3001
|
function FailureView(spec) {
|
@@ -2802,6 +3005,7 @@
|
|
2802
3005
|
|
2803
3006
|
FailureView.prototype.build = function() {
|
2804
3007
|
var error, html, _i, _len, _ref;
|
3008
|
+
|
2805
3009
|
FailureView.__super__.build.call(this, "spec");
|
2806
3010
|
html = "<h1 class=\"teabag-clearfix\"><a href=\"" + this.spec.link + "\">" + this.spec.fullDescription + "</a></h1>";
|
2807
3011
|
_ref = this.spec.errors();
|
@@ -2847,6 +3051,7 @@
|
|
2847
3051
|
|
2848
3052
|
SuiteView.prototype.buildParent = function() {
|
2849
3053
|
var parent, view;
|
3054
|
+
|
2850
3055
|
parent = this.suite.parent;
|
2851
3056
|
if (!parent) {
|
2852
3057
|
return this.reporter;
|
@@ -2868,6 +3073,7 @@
|
|
2868
3073
|
|
2869
3074
|
SuiteView.prototype.updateState = function(state) {
|
2870
3075
|
var _base;
|
3076
|
+
|
2871
3077
|
if (this.state === "failed") {
|
2872
3078
|
return;
|
2873
3079
|
}
|
@@ -2884,7 +3090,6 @@
|
|
2884
3090
|
|
2885
3091
|
}).call(this);
|
2886
3092
|
(function() {
|
2887
|
-
|
2888
3093
|
Teabag.Reporters.HTML.template = "<div class=\"teabag-clearfix\">\n <div id=\"teabag-title\">\n <h1><a href=\"\" id=\"teabag-root-link\">Teabag</a></h1>\n <ul>\n <li>version: <b id=\"teabag-version\"></b></li>\n <li id=\"teabag-env-info\"></li>\n </ul>\n </div>\n <div id=\"teabag-progress\"></div>\n <ul id=\"teabag-stats\">\n <li>passes: <b id=\"teabag-stats-passes\">0</b></li>\n <li>failures: <b id=\"teabag-stats-failures\">0</b></li>\n <li>skipped: <b id=\"teabag-stats-skipped\">0</b></li>\n <li>duration: <b id=\"teabag-stats-duration\">∞</b></li>\n </ul>\n</div>\n\n<div id=\"teabag-controls\" class=\"teabag-clearfix\">\n <div id=\"teabag-toggles\">\n <button id=\"teabag-use-catch\" title=\"Toggle using try/catch wrappers when possible\">Try/Catch</button>\n <button id=\"teabag-build-full-report\" title=\"Toggle building the full report\">Full Report</button>\n <button id=\"teabag-display-progress\" title=\"Toggle displaying progress as tests run\">Progress</button>\n </div>\n <div id=\"teabag-suites\"></div>\n</div>\n\n<hr/>\n\n<div id=\"teabag-filter\">\n <h1>Filtering</h1>\n <ul id=\"teabag-filter-list\"></ul>\n</div>\n\n<div id=\"teabag-report\">\n <ol id=\"teabag-report-failures\"></ol>\n <ol id=\"teabag-report-all\"></ol>\n</div>";
|
2889
3094
|
|
2890
3095
|
}).call(this);
|
@@ -2892,10 +3097,8 @@
|
|
2892
3097
|
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
|
2893
3098
|
|
2894
3099
|
Teabag.Reporters.Console = (function() {
|
2895
|
-
|
2896
3100
|
function Console() {
|
2897
|
-
this.reportRunnerResults = __bind(this.reportRunnerResults, this);
|
2898
|
-
this.start = new Teabag.Date();
|
3101
|
+
this.reportRunnerResults = __bind(this.reportRunnerResults, this); this.start = new Teabag.Date();
|
2899
3102
|
this.suites = {};
|
2900
3103
|
}
|
2901
3104
|
|
@@ -2909,6 +3112,7 @@
|
|
2909
3112
|
|
2910
3113
|
Console.prototype.reportSuites = function() {
|
2911
3114
|
var index, suite, _i, _len, _ref, _results;
|
3115
|
+
|
2912
3116
|
_ref = this.spec.getParents();
|
2913
3117
|
_results = [];
|
2914
3118
|
for (index = _i = 0, _len = _ref.length; _i < _len; index = ++_i) {
|
@@ -2928,6 +3132,7 @@
|
|
2928
3132
|
|
2929
3133
|
Console.prototype.reportSpecResults = function(spec) {
|
2930
3134
|
var result;
|
3135
|
+
|
2931
3136
|
this.spec = new Teabag.Spec(spec);
|
2932
3137
|
result = this.spec.result();
|
2933
3138
|
if (result.skipped) {
|
@@ -2952,6 +3157,7 @@
|
|
2952
3157
|
|
2953
3158
|
Console.prototype.trackPending = function() {
|
2954
3159
|
var result;
|
3160
|
+
|
2955
3161
|
result = this.spec.result();
|
2956
3162
|
return this.log({
|
2957
3163
|
type: "spec",
|
@@ -2964,6 +3170,7 @@
|
|
2964
3170
|
|
2965
3171
|
Console.prototype.trackFailure = function() {
|
2966
3172
|
var error, result, _i, _len, _ref, _results;
|
3173
|
+
|
2967
3174
|
result = this.spec.result();
|
2968
3175
|
_ref = this.spec.errors();
|
2969
3176
|
_results = [];
|
@@ -3048,19 +3255,17 @@
|
|
3048
3255
|
|
3049
3256
|
}).call(this);
|
3050
3257
|
(function() {
|
3051
|
-
var
|
3258
|
+
var _ref, _ref1,
|
3259
|
+
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
3052
3260
|
__hasProp = {}.hasOwnProperty,
|
3053
3261
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
3054
3262
|
|
3055
3263
|
Teabag.Reporters.HTML = (function(_super) {
|
3056
|
-
|
3057
3264
|
__extends(HTML, _super);
|
3058
3265
|
|
3059
3266
|
function HTML(env) {
|
3060
3267
|
this.reportRunnerResults = __bind(this.reportRunnerResults, this);
|
3061
|
-
|
3062
|
-
this.reportSpecResults = __bind(this.reportSpecResults, this);
|
3063
|
-
HTML.__super__.constructor.apply(this, arguments);
|
3268
|
+
this.reportSpecResults = __bind(this.reportSpecResults, this); HTML.__super__.constructor.apply(this, arguments);
|
3064
3269
|
env.log(this.reportSpecResults);
|
3065
3270
|
env.testDone(this.reportSpecResults);
|
3066
3271
|
env.done(this.reportRunnerResults);
|
@@ -3095,7 +3300,7 @@
|
|
3095
3300
|
};
|
3096
3301
|
|
3097
3302
|
HTML.prototype.envInfo = function() {
|
3098
|
-
return "qunit 1.
|
3303
|
+
return "qunit 1.11.0";
|
3099
3304
|
};
|
3100
3305
|
|
3101
3306
|
return HTML;
|
@@ -3103,20 +3308,21 @@
|
|
3103
3308
|
})(Teabag.Reporters.HTML);
|
3104
3309
|
|
3105
3310
|
Teabag.Reporters.HTML.SpecView = (function(_super) {
|
3106
|
-
|
3107
3311
|
__extends(SpecView, _super);
|
3108
3312
|
|
3109
3313
|
function SpecView() {
|
3110
|
-
|
3314
|
+
_ref = SpecView.__super__.constructor.apply(this, arguments);
|
3315
|
+
return _ref;
|
3111
3316
|
}
|
3112
3317
|
|
3113
3318
|
SpecView.prototype.buildErrors = function() {
|
3114
|
-
var div, error, html, _i, _len,
|
3319
|
+
var div, error, html, _i, _len, _ref1;
|
3320
|
+
|
3115
3321
|
div = this.createEl("div");
|
3116
3322
|
html = "";
|
3117
|
-
|
3118
|
-
for (_i = 0, _len =
|
3119
|
-
error =
|
3323
|
+
_ref1 = this.spec.errors();
|
3324
|
+
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
3325
|
+
error = _ref1[_i];
|
3120
3326
|
html += "<strong>" + error.message + "</strong><br/>" + (this.htmlSafe(error.stack || "Stack trace unavailable")) + "<br/>";
|
3121
3327
|
}
|
3122
3328
|
div.innerHTML = html;
|
@@ -3125,6 +3331,7 @@
|
|
3125
3331
|
|
3126
3332
|
SpecView.prototype.buildParent = function() {
|
3127
3333
|
var parent, view;
|
3334
|
+
|
3128
3335
|
parent = this.spec.parent;
|
3129
3336
|
if (!parent) {
|
3130
3337
|
return this.reporter;
|
@@ -3142,20 +3349,21 @@
|
|
3142
3349
|
})(Teabag.Reporters.HTML.SpecView);
|
3143
3350
|
|
3144
3351
|
Teabag.Reporters.HTML.FailureView = (function(_super) {
|
3145
|
-
|
3146
3352
|
__extends(FailureView, _super);
|
3147
3353
|
|
3148
3354
|
function FailureView() {
|
3149
|
-
|
3355
|
+
_ref1 = FailureView.__super__.constructor.apply(this, arguments);
|
3356
|
+
return _ref1;
|
3150
3357
|
}
|
3151
3358
|
|
3152
3359
|
FailureView.prototype.build = function() {
|
3153
|
-
var error, html, _i, _len,
|
3360
|
+
var error, html, _i, _len, _ref2;
|
3361
|
+
|
3154
3362
|
FailureView.__super__.build.call(this, "spec");
|
3155
3363
|
html = "<h1 class=\"teabag-clearfix\"><a href=\"" + this.spec.link + "\">" + this.spec.fullDescription + "</a></h1>";
|
3156
|
-
|
3157
|
-
for (_i = 0, _len =
|
3158
|
-
error =
|
3364
|
+
_ref2 = this.spec.errors();
|
3365
|
+
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
|
3366
|
+
error = _ref2[_i];
|
3159
3367
|
html += "<div><strong>" + error.message + "</strong><br/>" + (this.htmlSafe(error.stack || "Stack trace unavailable")) + "</div>";
|
3160
3368
|
}
|
3161
3369
|
return this.el.innerHTML = html;
|
@@ -3166,7 +3374,6 @@
|
|
3166
3374
|
})(Teabag.Reporters.HTML.FailureView);
|
3167
3375
|
|
3168
3376
|
Teabag.Reporters.HTML.SuiteView = (function(_super) {
|
3169
|
-
|
3170
3377
|
__extends(SuiteView, _super);
|
3171
3378
|
|
3172
3379
|
function SuiteView(suite, reporter) {
|
@@ -3188,7 +3395,6 @@
|
|
3188
3395
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
3189
3396
|
|
3190
3397
|
Teabag.Runner = (function(_super) {
|
3191
|
-
|
3192
3398
|
__extends(Runner, _super);
|
3193
3399
|
|
3194
3400
|
function Runner() {
|
@@ -3205,7 +3411,6 @@
|
|
3205
3411
|
})(Teabag.Runner);
|
3206
3412
|
|
3207
3413
|
Teabag.Spec = (function() {
|
3208
|
-
|
3209
3414
|
function Spec(spec) {
|
3210
3415
|
this.spec = spec;
|
3211
3416
|
this.fullDescription = "" + this.spec.module + " " + this.spec.name;
|
@@ -3221,6 +3426,7 @@
|
|
3221
3426
|
|
3222
3427
|
Spec.prototype.errors = function() {
|
3223
3428
|
var item, _i, _len, _ref, _results;
|
3429
|
+
|
3224
3430
|
if (!this.spec.failed) {
|
3225
3431
|
return [];
|
3226
3432
|
}
|
@@ -3248,6 +3454,7 @@
|
|
3248
3454
|
|
3249
3455
|
Spec.prototype.result = function() {
|
3250
3456
|
var status;
|
3457
|
+
|
3251
3458
|
status = "failed";
|
3252
3459
|
if (!this.spec.failed) {
|
3253
3460
|
status = "passed";
|
@@ -3263,7 +3470,6 @@
|
|
3263
3470
|
})();
|
3264
3471
|
|
3265
3472
|
Teabag.Suite = (function() {
|
3266
|
-
|
3267
3473
|
function Suite(suite) {
|
3268
3474
|
this.suite = suite;
|
3269
3475
|
this.fullDescription = this.suite.description;
|