Skip to content

Commit

Permalink
fixed jshint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
beatfactor committed May 24, 2016
1 parent 804956c commit a17de4c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
3 changes: 2 additions & 1 deletion lib/core/assertion.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ module.exports = new (function() {

var failure = '';
var stacktrace = '';
var fullMsg = '';

if (passed) {
if (client.options.output && client.options.detailed_output) {
Expand All @@ -229,7 +230,7 @@ module.exports = new (function() {

err.stack = buildStackTrace(originalStackTrace, client.options.start_session ? null : 'AssertionError: ' + message);

var fullMsg = message;
fullMsg = message;
if (client.options.output && client.options.detailed_output) {
var logged = ' ' + Logger.colors.red(failSymbol);
if (typeof expectedValue != 'undefined' && typeof receivedValue != 'undefined') {
Expand Down
26 changes: 14 additions & 12 deletions lib/runner/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,20 @@ Runner.prototype.runTestModule = function(modulePath, fullPaths) {
testSuiteResult.errmessages = testResults.errmessages || [];
testSuiteResult.failures = failures;
testSuiteResult.errors = errors;
process.send && process.send(JSON.stringify({
type : 'testsuite_finished',
itemKey : process.env.__NIGHTWATCH_ENV_LABEL,
moduleKey : moduleKey,
results : this.globalResults.modules[moduleKey],
errmessages : testSuiteResult.errmessages,
passed : this.globalResults.passed,
failed : this.globalResults.failed,
errors : this.globalResults.errors,
skipped : this.globalResults.skipped,
tests : this.globalResults.tests
}));
if (typeof process.send == 'function') {
process.send(JSON.stringify({
type: 'testsuite_finished',
itemKey: process.env.__NIGHTWATCH_ENV_LABEL,
moduleKey: moduleKey,
results: this.globalResults.modules[moduleKey],
errmessages: testSuiteResult.errmessages,
passed: this.globalResults.passed,
failed: this.globalResults.failed,
errors: this.globalResults.errors,
skipped: this.globalResults.skipped,
tests: this.globalResults.tests
}));
}

return testResults;
}.bind(this));
Expand Down
2 changes: 1 addition & 1 deletion lib/util/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ Util.symbols = (function() {
})();

Util.isErrorObject = function(err) {
return err instanceof Error || toString.call(err) === '[object Error]';
return err instanceof Error || Object.prototype.toString.call(err) === '[object Error]';
};

function contains(str, text) {
Expand Down

0 comments on commit a17de4c

Please sign in to comment.