From 31b87354f55f24501ca8b2f02477cb692a70457c Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 21 Feb 2021 14:21:39 -0800 Subject: [PATCH] [Tests] increase coverage --- test/shimmed.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/shimmed.js b/test/shimmed.js index e82abe5..57cf69c 100644 --- a/test/shimmed.js +++ b/test/shimmed.js @@ -1,7 +1,6 @@ 'use strict'; -var trim = require('../'); -trim.shim(); +require('../auto'); var test = require('tape'); var defineProperties = require('define-properties'); @@ -26,8 +25,8 @@ test('shimmed', function (t) { var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { - st['throws'](function () { return trim(undefined, 'a'); }, TypeError, 'undefined is not an object'); - st['throws'](function () { return trim(null, 'a'); }, TypeError, 'null is not an object'); + st['throws'](function () { return String.prototype.trim.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return String.prototype.trim.call(null, 'a'); }, TypeError, 'null is not an object'); st.end(); });