Constconst obj = { visible: 'value' };
Object.defineProperty(obj, 'hidden', {
  value: 'secret',
  enumerable: false,
});
expect(obj, 'to have enumerable property', 'visible'); // ✓ passes
expect(obj, 'to have enumerable property', 'hidden'); // ✗ fails - not enumerable
expect(obj, 'to have enumerable property', 'nonexistent'); // ✗ fails - property doesn't exist
enumerablePropertyAssertion - Alternative parameter order
Asserts that an object has a specified property that is enumerable.
This is an alternative form of enumerablePropertyAssertion with the object and property key parameters in reverse order. It checks that the given property exists on the object and has its
enumerabledescriptor set totrueusingObject.getOwnPropertyDescriptor(). Only own properties (not inherited ones) are considered.