Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from ljharb:main #47

Merged
merged 4 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion helpers/assertRecord.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var predicates = {
'RegExp Record': isRegExpRecord
};

module.exports = function assertRecord(recordType, argumentName, value) {
module.exports = function assertRecord(Type, recordType, argumentName, value) {
var predicate = predicates[recordType];
if (typeof predicate !== 'function') {
throw new $SyntaxError('unknown record type: ' + recordType);
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@
"aud": "^2.0.4",
"available-regexp-flags": "^1.0.2",
"cheerio": "=1.0.0-rc.3",
"define-accessor-property": "^1.0.0",
"define-data-property": "^1.1.4",
"diff": "^5.1.0",
"eclint": "^2.8.1",
"es-value-fixtures": "^1.4.2",
Expand All @@ -130,7 +132,7 @@
"object.fromentries": "^2.0.7",
"safe-publish-latest": "^2.0.0",
"ses": "^0.18.8",
"tape": "^5.7.4"
"tape": "^5.7.5"
},
"testling": {
"files": "test/index.js",
Expand Down
11 changes: 6 additions & 5 deletions test/helpers/OwnPropertyKeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
var test = require('tape');
var hasSymbols = require('has-symbols')();
var $defineProperty = require('es-define-property');
var defineAccessorProperty = require('define-accessor-property');
var defineDataProperty = require('define-data-property');

var OwnPropertyKeys = require('../../helpers/OwnPropertyKeys');
var defineProperty = require('./defineProperty');

test('OwnPropertyKeys', function (t) {
t.deepEqual(OwnPropertyKeys({ a: 1, b: 2 }).sort(), ['a', 'b'].sort(), 'returns own string keys');
Expand All @@ -22,12 +23,12 @@ test('OwnPropertyKeys', function (t) {

t.test('non-enumerables', { skip: !$defineProperty }, function (st) {
var o = { a: 1, b: 42, c: NaN };
defineProperty(o, 'b', { enumerable: false, value: 42 });
defineProperty(o, 'c', { enumerable: false, get: function () { return NaN; } });
defineDataProperty(o, 'b', { nonEnumerable: true, value: 42 });
defineAccessorProperty(o, 'c', { nonEnumerable: true, get: function () { return NaN; } });

if (hasSymbols) {
defineProperty(o, 'd', { enumerable: false, value: true });
defineProperty(o, 'e', { enumerable: false, get: function () { return true; } });
defineDataProperty(o, 'd', { nonEnumerable: true, value: true });
defineAccessorProperty(o, 'e', { nonEnumerable: true, get: function () { return true; } });
}

st.deepEqual(
Expand Down
4 changes: 2 additions & 2 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -7773,7 +7773,7 @@ var es2019 = function ES2019(ES, ops, expectedMissing, skips) {
});

test('AsyncFromSyncIteratorContinuation', function (t) {
forEach(v.nonObjects, function (nonObject) {
forEach(v.primitives, function (nonObject) {
t['throws'](
function () { ES.AsyncFromSyncIteratorContinuation(nonObject); },
TypeError,
Expand Down Expand Up @@ -14134,7 +14134,7 @@ var es2023 = function ES2023(ES, ops, expectedMissing, skips) {
});

test('KeyForSymbol', function (t) {
forEach(v.nonSymbols, function (nonSymbol) {
forEach(v.nonSymbolPrimitives, function (nonSymbol) {
t['throws'](
function () { ES.KeyForSymbol(nonSymbol); },
TypeError,
Expand Down
Loading