mirror of https://github.com/tc39/test262.git
Apply review feedback
This commit is contained in:
parent
ca11ac4a43
commit
73f80aea4d
|
@ -6,6 +6,7 @@ esid: sec-finalization-group-constructor
|
|||
description: >
|
||||
The FinalizationGroup constructor is the %FinalizationGroup% intrinsic object and the initial
|
||||
value of the FinalizationGroup property of the global object.
|
||||
features: [FinalizationGroup]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
|
|
|
@ -23,7 +23,7 @@ info: |
|
|||
4. Set obj.[[Prototype]] to proto.
|
||||
5. Set obj.[[Extensible]] to true.
|
||||
6. Return obj.
|
||||
features: [FinalizationGroup, Reflect]
|
||||
features: [FinalizationGroup]
|
||||
---*/
|
||||
|
||||
var fg = new FinalizationGroup(function() {});
|
||||
|
|
|
@ -38,4 +38,4 @@ assert.throws(Test262Error, function() {
|
|||
Reflect.construct(FinalizationGroup, [function() {}], newTarget);
|
||||
});
|
||||
|
||||
assert.sameValue(calls, 1);
|
||||
assert.sameValue(calls, 1);
|
||||
|
|
|
@ -20,38 +20,34 @@ assert.sameValue(typeof FinalizationGroup.prototype.cleanupSome, 'function');
|
|||
var fg = new FinalizationGroup(function() {});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(undefined);
|
||||
}, 'undefined');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(null);
|
||||
fg.cleanupSome(null);
|
||||
}, 'null');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(true);
|
||||
fg.cleanupSome(true);
|
||||
}, 'true');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(false);
|
||||
fg.cleanupSome(false);
|
||||
}, 'false');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(1);
|
||||
fg.cleanupSome(1);
|
||||
}, 'number');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg('object');
|
||||
fg.cleanupSome('object');
|
||||
}, 'string');
|
||||
|
||||
var s = Symbol();
|
||||
assert.throws(TypeError, function() {
|
||||
fg(s);
|
||||
fg.cleanupSome(s);
|
||||
}, 'symbol');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg({});
|
||||
fg.cleanupSome({});
|
||||
}, 'object');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(FinalizationGroup.prototype);
|
||||
fg.cleanupSome(FinalizationGroup.prototype);
|
||||
}, 'FinalizationGroup.prototype');
|
||||
|
|
|
@ -13,7 +13,7 @@ info: |
|
|||
4. If callback is not undefined and IsCallable(callback) is false, throw a TypeError exception.
|
||||
5. Perform ! CleanupFinalizationGroup(finalizationGroup, callback).
|
||||
6. Return undefined.
|
||||
features: [FinalizationGroup]
|
||||
features: [FinalizationGroup, arrow-function, async-functions, async-iteration, class]
|
||||
---*/
|
||||
|
||||
var fn = function() {};
|
||||
|
|
|
@ -26,7 +26,7 @@ features: [FinalizationGroup]
|
|||
|
||||
verifyProperty(FinalizationGroup.prototype.register, 'length', {
|
||||
value: 2,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
configurable: true
|
||||
});
|
||||
|
|
|
@ -25,7 +25,7 @@ features: [FinalizationGroup]
|
|||
|
||||
verifyProperty(FinalizationGroup.prototype.register, 'name', {
|
||||
value: 'register',
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
configurable: true
|
||||
});
|
||||
|
|
|
@ -23,30 +23,30 @@ assert.sameValue(typeof FinalizationGroup.prototype.register, 'function');
|
|||
var fg = new FinalizationGroup(function() {});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(undefined);
|
||||
fg.register(undefined);
|
||||
}, 'undefined');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(null);
|
||||
fg.register(null);
|
||||
}, 'null');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(true);
|
||||
fg.register(true);
|
||||
}, 'true');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(false);
|
||||
fg.register(false);
|
||||
}, 'false');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(1);
|
||||
fg.register(1);
|
||||
}, 'number');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg('object');
|
||||
fg.register('object');
|
||||
}, 'string');
|
||||
|
||||
var s = Symbol();
|
||||
assert.throws(TypeError, function() {
|
||||
fg(s);
|
||||
fg.register(s);
|
||||
}, 'symbol');
|
||||
|
|
|
@ -23,26 +23,26 @@ var fg = new FinalizationGroup(function() {});
|
|||
var target = {};
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(target, undefined, null);
|
||||
fg.register(target, undefined, null);
|
||||
}, 'null');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(target, undefined, true);
|
||||
fg.register(target, undefined, true);
|
||||
}, 'true');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(target, undefined, false);
|
||||
fg.register(target, undefined, false);
|
||||
}, 'false');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(target, undefined, 1);
|
||||
fg.register(target, undefined, 1);
|
||||
}, 'number');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(target, undefined, 'object');
|
||||
fg.register(target, undefined, 'object');
|
||||
}, 'string');
|
||||
|
||||
var s = Symbol();
|
||||
assert.throws(TypeError, function() {
|
||||
fg(target, undefined, s);
|
||||
fg.register(target, undefined, s);
|
||||
}, 'symbol');
|
||||
|
|
|
@ -20,30 +20,30 @@ assert.sameValue(typeof FinalizationGroup.prototype.unregister, 'function');
|
|||
var fg = new FinalizationGroup(function() {});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(undefined);
|
||||
fg.unregister(undefined);
|
||||
}, 'undefined');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(null);
|
||||
fg.unregister(null);
|
||||
}, 'null');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(true);
|
||||
fg.unregister(true);
|
||||
}, 'true');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(false);
|
||||
fg.unregister(false);
|
||||
}, 'false');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg(1);
|
||||
fg.unregister(1);
|
||||
}, 'number');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
fg('object');
|
||||
fg.unregister('object');
|
||||
}, 'string');
|
||||
|
||||
var s = Symbol();
|
||||
assert.throws(TypeError, function() {
|
||||
fg(s);
|
||||
fg.unregister(s);
|
||||
}, 'symbol');
|
||||
|
|
|
@ -18,7 +18,7 @@ info: |
|
|||
...
|
||||
2. Let proto be ? GetPrototypeFromConstructor(constructor, intrinsicDefaultProto).
|
||||
3. Return ObjectCreate(proto, internalSlotsList).
|
||||
features: [FinalizationGroup]
|
||||
features: [FinalizationGroup, for-of]
|
||||
---*/
|
||||
|
||||
var cleanupCallback = function() {};
|
||||
|
|
Loading…
Reference in New Issue