Const FunctionOnly considers own enumerable string keys (equivalent to Object.keys()).
Symbol keys and non-enumerable keys are not checked.
expect({ foo: 1, bar: 2 }, 'to have keys matching', /^[a-z]+$/); // passes
expect({ foo: 1, bar: 2 }, 'to have props matching', /^[a-z]+$/); // alias
expect({ foo: 1, bar: 2 }, 'to have fields matching', /^[a-z]+$/); // alias
expect({ foo: 1, Bar: 2 }, 'to have keys matching', /^[a-z]+$/); // fails
expect({}, 'to have keys matching', /anything/); // passes (vacuous)
Asserts that ALL own enumerable string keys of a non-collection object match a regular expression.
Empty objects pass vacuously.