summaryrefslogtreecommitdiff
path: root/test/built-ins/ThrowTypeError/throws-type-error.js
blob: 577dc4560292ce97c39a505e6477f5adb919c1bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (C) 2016 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-%throwtypeerror%
description: >
  %ThrowTypeError% throws a TypeError when called.
info: |
  %ThrowTypeError% ( )

  When %ThrowTypeError% is called it performs the following steps:

    1. Throw a TypeError exception.
---*/

var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;

assert.throws(TypeError, function() {
  ThrowTypeError();
});