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 24, 2021
1 parent 10e0e47 commit 711e6a6
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 trimEnd = require('../');
trimEnd.shim();
require('../auto');

var runTests = require('./tests');

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 trimEnd(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return trimEnd(null, 'a'); }, TypeError, 'null is not an object');
st['throws'](function () { return String.prototype.trimEnd.call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return String.prototype.trimEnd.call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});

Expand Down

0 comments on commit 711e6a6

Please sign in to comment.