Asserts that an object is sealed using Object.isSealed().
A sealed object cannot have new properties added to it, and all existing
properties are marked as non-configurable. However, writable properties can
still be modified. This is less restrictive than being frozen but more
restrictive than being non-extensible.
Example
constobj={ prop:'value'}; Object.seal(obj);
expect(obj,'to be sealed');// ✓ passes
obj.prop='new value';// This still works obj.newProp='fail';// This will fail (in strict mode)
constregular={}; expect(regular,'to be sealed');// ✗ fails - not sealed
Asserts that an object is sealed using
Object.isSealed().A sealed object cannot have new properties added to it, and all existing properties are marked as non-configurable. However, writable properties can still be modified. This is less restrictive than being frozen but more restrictive than being non-extensible.