snapdragon 0.1.10 → 0.1.11
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.
- checksums.yaml +4 -4
- data/ChangeLog.markdown +4 -0
- data/lib/snapdragon/resources/SnapdragonJUnitReporter.js +16 -29
- data/lib/snapdragon/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9390e3dda99e7b5b4504f7b2ab6b8378a6af47c
|
4
|
+
data.tar.gz: 6d0791fc137d5b7abe928089059d821149855ef4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 722a22b9ce7b80b9681d1b373d2f562f007076d436120fb930a909a658cf8fecbda903799aa0363e2e0579f9fec329a4cc4373746cdb5589d24dbeed5a3af608
|
7
|
+
data.tar.gz: 35900ed38fc0923362b9b3fff2aab8fbb02149b8bf77ae394ffc5f15574dd8bbf12782c138de308c3de3e040d2dc3e2ce4f0d2b4ddbe2547111764f1f23fb7b4
|
data/ChangeLog.markdown
CHANGED
@@ -40,6 +40,11 @@
|
|
40
40
|
};
|
41
41
|
|
42
42
|
JUnitXmlReporter.prototype = {
|
43
|
+
reportRunnerStarting: function() {
|
44
|
+
this.print('<?xml version="1.0" encoding="UTF-8" ?>');
|
45
|
+
this.print("<testsuites>");
|
46
|
+
},
|
47
|
+
|
43
48
|
reportSpecStarting: function(spec) {
|
44
49
|
spec.startTime = new Date();
|
45
50
|
|
@@ -80,7 +85,6 @@
|
|
80
85
|
reportSuiteResults: function(suite) {
|
81
86
|
var results = suite.results();
|
82
87
|
var specs = suite.specs();
|
83
|
-
var specOutput = "";
|
84
88
|
// for JUnit results, let's only include directly failed tests (not nested suites')
|
85
89
|
var failedCount = 0;
|
86
90
|
|
@@ -96,31 +100,18 @@
|
|
96
100
|
|
97
101
|
for (var i = 0; i < specs.length; i++) {
|
98
102
|
failedCount += specs[i].didFail ? 1 : 0;
|
99
|
-
specOutput += "\n " + specs[i].output;
|
100
103
|
}
|
101
|
-
|
104
|
+
this.print('<testsuite name="' + this.getFullName(suite) +
|
102
105
|
'" errors="0" tests="' + specs.length + '" failures="' + failedCount +
|
103
|
-
'" time="' + suite.duration + '" timestamp="' + ISODateString(suite.startTime) + '">';
|
104
|
-
|
105
|
-
|
106
|
+
'" time="' + suite.duration + '" timestamp="' + ISODateString(suite.startTime) + '">');
|
107
|
+
for (var i = 0; i < specs.length; i++) {
|
108
|
+
this.print(specs[i].output);
|
109
|
+
}
|
110
|
+
this.print("</testsuite>");
|
106
111
|
},
|
107
112
|
|
108
113
|
reportRunnerResults: function(runner) {
|
109
|
-
|
110
|
-
for (var i = 0; i < suites.length; i++) {
|
111
|
-
var suite = suites[i];
|
112
|
-
var output = '<?xml version="1.0" encoding="UTF-8" ?>';
|
113
|
-
// if we are consolidating, only write out top-level suites
|
114
|
-
if (suite.parentSuite) {
|
115
|
-
continue;
|
116
|
-
}
|
117
|
-
else {
|
118
|
-
output += "\n<testsuites>";
|
119
|
-
output += this.getNestedOutput(suite);
|
120
|
-
output += "\n</testsuites>";
|
121
|
-
this.print(output);
|
122
|
-
}
|
123
|
-
}
|
114
|
+
this.print("</testsuites>");
|
124
115
|
this.signalCapybaraTestsFinishedRunning();
|
125
116
|
},
|
126
117
|
|
@@ -130,14 +121,6 @@
|
|
130
121
|
document.body.appendChild(div);
|
131
122
|
},
|
132
123
|
|
133
|
-
getNestedOutput: function(suite) {
|
134
|
-
var output = suite.output;
|
135
|
-
for (var i = 0; i < suite.suites().length; i++) {
|
136
|
-
output += this.getNestedOutput(suite.suites()[i]);
|
137
|
-
}
|
138
|
-
return output;
|
139
|
-
},
|
140
|
-
|
141
124
|
getFullName: function(suite, isFilename) {
|
142
125
|
var fullName;
|
143
126
|
if (this.useDotNotation) {
|
@@ -158,6 +141,10 @@
|
|
158
141
|
},
|
159
142
|
|
160
143
|
print: function(str) {
|
144
|
+
this.log(str);
|
145
|
+
},
|
146
|
+
|
147
|
+
log: function(str) {
|
161
148
|
var console = jasmine.getGlobal().console;
|
162
149
|
|
163
150
|
if (console && console.log) {
|
data/lib/snapdragon/version.rb
CHANGED