-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tests] add
implementation
test; run es-shim-api
in postlint; use…
… `tape` runner
- Loading branch information
Showing
2 changed files
with
25 additions
and
5 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
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 array/this value', { 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(); | ||
}); |