astro-ghostcms/.pnpm-store/v3/files/05/5b1ec7bdf08a6716969440b4571...

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();
});