frontend/.pnpm-store/v3/files/05/5b1ec7bdf08a6716969440b4571ed19b5808a45acd8dab753ef45bc9f2b86efaf92694b0b2554b49f9892292f36e78c5986763d5c915de399ac92cb3d8c885

22 lines
608 B
Plaintext

'use strict';
var trim = require('../implementation');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var callBind = require('call-bind');
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { trim.call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { trim.call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(trim), t);
t.end();
});