chai-nightwatch
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -49,16 +49,20 @@ /*! | ||
return new Proxy(this, { | ||
get: function(obj, prop) { | ||
if (typeof prop != 'string') { | ||
get: function(target, property) { | ||
if (typeof property != 'string') { | ||
return {}; | ||
} | ||
if (prop in obj) { | ||
return obj[prop]; | ||
if (!Reflect.has(target, property)) { | ||
throw new Error(`Unknown property: "${property}". Please consult docs at: https://nightwatchjs.org/api/expect`) | ||
} | ||
if (prop === 'deferred' || isComponent) { | ||
if ((property === 'deferred') || isComponent) { | ||
return; | ||
} | ||
throw new Error(`Unknown property: "${prop}". Please consult docs at: http://nightwatchjs.org/api.`) | ||
if (property === 'then' || property === 'catch') { | ||
return target[property].bind(target); // Method Promise.prototype.then called on incompatible receiver [object Object] | ||
} | ||
return Reflect.get(target, property); | ||
} | ||
@@ -65,0 +69,0 @@ }); |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
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
33188
1052