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 a key matching', /^[a-z]+$/); // passes
expect({ foo: 1, BAR: 2 }, 'to have a prop matching', /^[a-z]+$/); // alias
expect({ foo: 1, BAR: 2 }, 'to have a field matching', /^[a-z]+$/); // alias
expect({ FOO: 1, BAR: 2 }, 'to have a key matching', /^[a-z]+$/); // fails
expect({ foo: 1 }, 'to have key matching', /foo/); // passes
Asserts that at least one own enumerable string key of a non-collection object matches a regular expression.
Fails on objects with no own enumerable string keys.