Last change
on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
601 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var flags = require('../implementation');
|
---|
4 | var callBind = require('call-bind');
|
---|
5 | var test = require('tape');
|
---|
6 | var hasStrictMode = require('has-strict-mode')();
|
---|
7 | var runTests = require('./tests');
|
---|
8 |
|
---|
9 | test('as a function', function (t) {
|
---|
10 | t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
|
---|
11 | /* eslint no-useless-call: 0 */
|
---|
12 | st['throws'](function () { flags.call(undefined); }, TypeError, 'undefined is not an object');
|
---|
13 | st['throws'](function () { flags.call(null); }, TypeError, 'null is not an object');
|
---|
14 | st.end();
|
---|
15 | });
|
---|
16 |
|
---|
17 | runTests(callBind(flags), t);
|
---|
18 |
|
---|
19 | t.end();
|
---|
20 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.