diff options
author | Domenic Denicola <d@domenic.me> | 2014-12-01 15:50:07 -0500 |
---|---|---|
committer | Domenic Denicola <d@domenic.me> | 2014-12-01 16:04:33 -0500 |
commit | 0d94ef1e98c2d72dcb6ad26028650f5b94d0391e (patch) | |
tree | 3a4f352d7e7062666d346fa3f8f6da2bae4aba80 /test/suite | |
parent | 4bb8c027e4e848bf4d02a002666cd17df14f4448 (diff) |
Example of using assert.js
Diffstat (limited to 'test/suite')
-rw-r--r-- | test/suite/es6/Array.prototype.find/Array.prototype.find_this-defined.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_this-defined.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_this-defined.js index 88bf029cd..6d25211d3 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_this-defined.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_this-defined.js @@ -8,10 +8,6 @@ description: thisArg should be bound to this if provided var globalThis = this; [1].find(function () { - if (this !== Array) { - $ERROR('#1: this !== Array'); - } - if (this === globalThis) { - $ERROR('#2: this === globalThis. Should be Array'); - } + assert.sameValue(this, Array, 'this should equal Array'); + assert.notSameValue(this, globalThis, 'this should not equal globalThis'); }, Array); |