forked from jivesoftware/QUnitTestRunnerPlugin
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathModifications-to-QUnit.patch
103 lines (89 loc) · 2.24 KB
/
Modifications-to-QUnit.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
From 7442670009609fd9e527b37dbb670d80af61d774 Mon Sep 17 00:00:00 2001
From: Jesse Hallett <[email protected]>
Date: Sat, 11 Sep 2010 13:09:36 -0700
Subject: [PATCH] Modifications to QUnit
---
qunit/qunit.js | 37 +++++++++----------------------------
1 files changed, 9 insertions(+), 28 deletions(-)
diff --git a/qunit/qunit.js b/qunit/qunit.js
index 9ef5f8d..7c0ce1e 100644
--- a/qunit/qunit.js
+++ b/qunit/qunit.js
@@ -155,6 +155,7 @@ var QUnit = {
}
var good = 0, bad = 0,
+ failures = [],
tests = id("qunit-tests");
config.stats.all += config.assertions.length;
@@ -178,6 +179,7 @@ var QUnit = {
bad++;
config.stats.bad++;
config.moduleStats.bad++;
+ failures.push( assertion.message || "(no message)" );
}
}
@@ -228,11 +230,12 @@ var QUnit = {
bad++;
config.stats.bad++;
config.moduleStats.bad++;
+ failures.push( config.assertions[i].message || "(no message)" );
}
}
}
- QUnit.testDone( testName, bad, config.assertions.length );
+ QUnit.testDone( testName, bad, config.assertions.length, failures );
if ( !window.setTimeout && !config.queue.length ) {
done();
@@ -430,7 +433,7 @@ if ( typeof document === "undefined" || document.readyState === "complete" ) {
config.autorun = true;
}
-addEvent(window, "load", function() {
+QUnit.run = function() {
// Initialize the config, saving the execution queue
var oldconfig = extend({}, config);
QUnit.init();
@@ -496,7 +499,7 @@ addEvent(window, "load", function() {
}
QUnit.start();
-});
+};
function done() {
if ( config.doneTimer && window.clearTimeout ) {
@@ -550,31 +553,7 @@ function done() {
}
function validTest( name ) {
- var i = config.filters.length,
- run = false;
-
- if ( !i ) {
- return true;
- }
-
- while ( i-- ) {
- var filter = config.filters[i],
- not = filter.charAt(0) == '!';
-
- if ( not ) {
- filter = filter.slice(1);
- }
-
- if ( name.indexOf(filter) !== -1 ) {
- return !not;
- }
-
- if ( not ) {
- run = true;
- }
- }
-
- return run;
+ return true;
}
function push(result, actual, expected, message) {
@@ -1067,3 +1046,5 @@ QUnit.jsDump = (function() {
})();
})(this);
+
+// vim:tabstop=4:shiftwidth=4:noexpandtab
--
1.7.1