Fix Quality Issues using DeepSource (#1183)

Co-authored-by: DeepSource Bot <bot@deepsource.io>
This commit is contained in:
Moulik Aggarwal
2020-09-24 20:46:20 +05:30
committed by GitHub
parent 2e423b101b
commit b2ef26600c
14 changed files with 31 additions and 13 deletions

View File

@@ -102,7 +102,7 @@ class Expectation {
: this._fail(this._fmtNot(`Expected ${this.expectValue} (not)to be ${value}`))
}
toHaveProperty(value) {
return this._satisfies(this.expectValue.hasOwnProperty(value), true)
return this._satisfies(Object.prototype.hasOwnProperty.call(this.expectValue, value), true)
? this._pass()
: this._fail(
this._fmtNot(`Expected object ${this.expectValue} to (not)have property ${value}`)