Tim van der Lippe | fdbd42e | 2020-04-07 15:14:36 +0100 | [diff] [blame] | 1 | 'use strict'; |
| 2 | |
| 3 | var includes = require('../'); |
| 4 | var test = require('tape'); |
| 5 | var runTests = require('./tests'); |
| 6 | |
| 7 | test('as a function', function (t) { |
| 8 | t.test('bad array/this value', function (st) { |
| 9 | st['throws'](function () { includes(undefined, 'a'); }, TypeError, 'undefined is not an object'); |
| 10 | st['throws'](function () { includes(null, 'a'); }, TypeError, 'null is not an object'); |
| 11 | st.end(); |
| 12 | }); |
| 13 | |
| 14 | runTests(includes, t); |
| 15 | |
| 16 | t.end(); |
| 17 | }); |