-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tests] add cases for Infinities; increase coverage
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
var implementation = require('../implementation'); | ||
var callBind = require('es-abstract/helpers/callBind'); | ||
var test = require('tape'); | ||
var hasStrictMode = require('has-strict-mode')(); | ||
var runTests = require('./tests'); | ||
|
||
test('as a function', function (t) { | ||
t.test('bad first arg/receiver', { skip: !hasStrictMode }, function (st) { | ||
/* eslint no-useless-call: 0 */ | ||
st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object'); | ||
st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object'); | ||
st.end(); | ||
}); | ||
|
||
runTests(callBind(implementation), t); | ||
|
||
t.end(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters