nightwatch
Advanced tools
Comparing version 0.4.5 to 0.4.6
@@ -97,12 +97,7 @@ /*! | ||
// backwards compatibility | ||
var AssertionInstance = function (abortOnFailure, client) { | ||
this.abortOnFailure = abortOnFailure; | ||
this.client = client; | ||
this.api = client.api; | ||
}; | ||
util.inherits(AssertionInstance, events.EventEmitter); | ||
AssertionInstance.prototype.command = assertionFn; | ||
var module = loadCommandModule(assertionFn, client.api, { | ||
abortOnFailure : abortOnFailure | ||
}); | ||
assertion = new AssertionInstance(abortOnFailure, client); | ||
addCommand(commandName, assertion.command, assertion, parent); | ||
addCommand(commandName, module.command, module.context, parent); | ||
return assertion; | ||
@@ -194,3 +189,3 @@ } | ||
*/ | ||
function loadCommandModule(module, context) { | ||
function loadCommandModule(module, context, addt_props) { | ||
var m = {command: null, context: context}; | ||
@@ -202,3 +197,11 @@ | ||
} | ||
if (addt_props) { | ||
for (var prop in addt_props) { | ||
if (addt_props.hasOwnProperty(prop)) { | ||
this[prop] = addt_props[prop]; | ||
} | ||
} | ||
} | ||
this.client = client; | ||
this.api = client.api; | ||
if (typeof module === 'function') { | ||
@@ -205,0 +208,0 @@ module.call(this); |
@@ -154,4 +154,9 @@ /*! | ||
if (error) { | ||
var stackTrace = ''; | ||
if (error.stack) { | ||
stackTrace = '\n' + error.stack.split('\n').slice(1).join('\n'); | ||
} | ||
self.results.errors++; | ||
self.errors.push(error.name + ': ' + error.message); | ||
self.errors.push(error.name + ': ' + error.message + stackTrace); | ||
self.terminate(); | ||
@@ -158,0 +163,0 @@ return; |
{ | ||
"name": "nightwatch", | ||
"description": "A node.js bindings implementation for selenium 2.0/webdriver", | ||
"version": "0.4.5", | ||
"version": "0.4.6", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Andrei Rusu", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
255454
7325