Skip to content

Commit 40f513a

Browse files
committed
junit output
1 parent 3cf6772 commit 40f513a

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
check:
22
@for i in test/*.js; do \
3-
TEST_VERBOSE=1 NODE_PATH=`pwd`/lib test/checktest.sh $$i ; \
3+
TEST_VERBOSE=1 NODE_PATH=`pwd`/lib test/checktest.sh `echo $$i | sed -e 's#test/##g;'` ; \
44
done

Diff for: lib/trial/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
exports.Test = require('./test');
3434
exports.Trial = require('./trial');
35+
exports.Junit = require('./junit');
3536

3637
exports.runtests = function(dir, params) {
3738
var trial = new exports.Trial(params);

Diff for: lib/trial/test.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ Test.prototype.succeed = function(msg, detail) {
147147
this.successes++;
148148
this.lines.push(info);
149149
this.linestatus.push('success');
150-
this.emit('progress', this, info, 'success');
150+
var self = this;
151+
this.emit('progress', self, info, 'success');
151152
this.possiblyComplete();
152153
}
153154

@@ -157,7 +158,8 @@ Test.prototype.fail = function(msg, detail) {
157158
this.failures++;
158159
this.lines.push(info);
159160
this.linestatus.push('failure');
160-
this.emit('progress', this, info, 'failure');
161+
var self = this;
162+
this.emit('progress', self, info, 'failure');
161163
this.possiblyComplete();
162164
}
163165

@@ -167,7 +169,8 @@ Test.prototype.skip = function(msg, detail) {
167169
this.skips++;
168170
this.lines.push(info);
169171
this.linestatus.push('skipped');
170-
this.emit('progress', this, info, 'skipped');
172+
var self = this;
173+
this.emit('progress', self, info, 'skipped');
171174
this.possiblyComplete();
172175
}
173176
Test.prototype.ok = function(v, msg) {

Diff for: lib/trial/trial.js

+1
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ Trial.prototype.add = function(test) {
293293

294294
Trial.prototype.run = function(report) {
295295
var trial = this;
296+
trial.emit('start', trial);
296297
if(trial.tap)
297298
console.log("1.." + trial.total_subtests);
298299
trial.auditDependencies();

Diff for: package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "trial",
33
"description": "A testing framework",
4-
"version": "0.0.9",
4+
"version": "0.0.10",
55
"author": "Theo Schlossnagle",
66
"repository": {
77
"type": "git",
@@ -13,5 +13,8 @@
1313
"directories": {
1414
"lib": "./lib/trial"
1515
},
16-
"main": "lib/trial/index.js"
16+
"main": "lib/trial/index.js",
17+
"dependencies": {
18+
"xml": "^1.0.1"
19+
}
1720
}

0 commit comments

Comments
 (0)