Skip to content

Commit

Permalink
[Tests] increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Feb 21, 2021
1 parent 9a28c39 commit 31b8735
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/shimmed.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var trim = require('../');
trim.shim();
require('../auto');

var test = require('tape');
var defineProperties = require('define-properties');
Expand All @@ -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();
});

Expand Down

0 comments on commit 31b8735

Please sign in to comment.