summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/prototype/includes/this-is-not-tuple.js
blob: 00679f2a73e27e96a1b1d391e18f40e92517800e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
  Throws a TypeError exception when `this` cannot be coerced to Tuple
---*/

var includes = Tuple.prototype.includes;

assertThrowsInstanceOf(() => includes.call(undefined, 42), TypeError,
		       "this is undefined");

assertThrowsInstanceOf(() => includes.call(null, 42), TypeError,
		       "this is null");

reportCompare(0, 0);