Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/reporters/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ exports.run = function (files, options, callback) {
};
if (files && files.length) {
var paths = files.map(function (p) {
return path.join(process.cwd(), p);
return path.resolve(process.cwd(), p);
});
nodeunit.runFiles(paths, opts);
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/eclipse.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ exports.run = function (files, options, callback) {
if (p.indexOf('/') === 0) {
return p;
}
return path.join(process.cwd(), p);
return path.resolve(process.cwd(), p);
});
var tracker = track.createTracker(function (tracker) {
if (tracker.unfinished()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ exports.run = function (files, options, callback) {

var start = new Date().getTime();
var paths = files.map(function (p) {
return path.join(process.cwd(), p);
return path.resolve(process.cwd(), p);
});

console.log('<html>');
Expand Down
8 changes: 4 additions & 4 deletions lib/reporters/junit.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var ensureDir = function (path, callback) {
var abspath = function (p, /*optional*/cwd) {
if (p[0] === '/') return p;
cwd = cwd || process.cwd();
return path.normalize(path.join(cwd, p));
return path.normalize(path.resolve(cwd, p));
};


Expand Down Expand Up @@ -94,7 +94,7 @@ exports.run = function (files, opts, callback) {

var start = new Date().getTime();
var paths = files.map(function (p) {
return path.join(process.cwd(), p);
return path.resolve(process.cwd(), p);
});

var modules = {}
Expand Down Expand Up @@ -150,7 +150,7 @@ exports.run = function (files, opts, callback) {
var rendered = ejs.render(tmpl, {
locals: {suites: [module]}
});
var filename = path.join(
var filename = path.resolve(
opts.output,
module.name + '.xml'
);
Expand All @@ -171,7 +171,7 @@ exports.run = function (files, opts, callback) {
' assertions (' + assertions.duration + 'ms)'
);
}

if (callback) callback(assertions.failures() ? new Error('We have got test failures.') : undefined);
});
});
Expand Down
6 changes: 3 additions & 3 deletions lib/reporters/machineout.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ exports.run = function (files, options, callback) {
return [type, name, filename, row, column, message].join(":");
};
var paths = files.map(function (p) {
return path.join(process.cwd(), p);
return path.resolve(process.cwd(), p);
});
var tracker = track.createTracker(function (tracker) {
if (tracker.unfinished()) {
var names = tracker.names();
for (var i = 0; i < names.length; i += 1) {
console.log(createErrorMessage(
'Error', names[i],
'', '', '',
'Error', names[i],
'', '', '',
'Undone tests - To fix this, make sure all tests call test.done()'
));
}
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/minimal.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ exports.run = function (files, options, callback) {

if (files && files.length) {
var paths = files.map(function (p) {
return path.join(process.cwd(), p);
return path.resolve(process.cwd(), p);
});
nodeunit.runFiles(paths, opts);
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/nested.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ exports.run = function (files, options) {

var start = new Date().getTime();
var paths = files.map(function (p) {
return path.join(process.cwd(), p);
return path.resolve(process.cwd(), p);
});
var tracker = track.createTracker(function (tracker) {
var i, names;
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/skip_passed.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ exports.run = function (files, options, callback) {

var start = new Date().getTime();
var paths = files.map(function (p) {
return path.join(process.cwd(), p);
return path.resolve(process.cwd(), p);
});

nodeunit.runFiles(paths, {
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ exports.run = function (files, options) {
}

var paths = files.map(function (p) {
return path.join(process.cwd(), p);
return path.resolve(process.cwd(), p);
});
var output = new TapProducer();
output.pipe(process.stdout);
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/verbose.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ exports.run = function (files, options) {

var start = new Date().getTime();
var paths = files.map(function (p) {
return path.join(process.cwd(), p);
return path.resolve(process.cwd(), p);
});
var tracker = track.createTracker(function (tracker) {
if (tracker.unfinished()) {
Expand Down