aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/es6/Array.prototype.find/Array.prototype.find_this-defined.js
blob: 6d25211d396711837c19e9e7b9d28a96e28c0fcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright (c) 2014 Matthew Meyers. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
description: thisArg should be bound to this if provided
---*/

var globalThis = this;

[1].find(function () {
    assert.sameValue(this, Array, 'this should equal Array');
    assert.notSameValue(this, globalThis, 'this should not equal globalThis');
}, Array);