This commit is contained in:
David Kale
2020-09-08 13:25:36 -04:00
parent e4246d2b5b
commit 91fcbb0108
4227 changed files with 416837 additions and 457884 deletions

View File

@@ -7,7 +7,7 @@ var test = require('tape');
var defineProperties = require('define-properties');
var runTests = require('./tests');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = function f() {}.name === 'f';
var functionsHaveNames = require('functions-have-names')();
test('shimmed', function (t) {
t.equal(Object.getOwnPropertyDescriptors.length, 1, 'Object.getOwnPropertyDescriptors has a length of 1');
@@ -24,8 +24,8 @@ test('shimmed', function (t) {
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad object/this value', { skip: !supportsStrictMode }, function (st) {
st.throws(function () { return getDescriptors(undefined, 'a'); }, TypeError, 'undefined is not an object');
st.throws(function () { return getDescriptors(null, 'a'); }, TypeError, 'null is not an object');
st['throws'](function () { return getDescriptors(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return getDescriptors(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});