fixes the bug by adding the object's key, rather than the object, to the array of unknown keys
adds a test for getFormattedError
updates record test to include more of the error message, and adds a nested example
updates the error message to include a colon (:) so that it aligns with the "missing key" error message, and so that the full error message is clearer; for example
invalid keys in record: ["c"] at `<value>` for `{"a":1,"b":"foo","c":"not-in-record-definition"}`
rather than
invalid keys in record ["c"] at `<value>` for `{"a":1,"b":"foo","c":"not-in-record-definition"}`
which could be read as meaning ["c"] is the record, for example like "invalid keys in record A" could be read.
Fixes
91
Description
See issue for further details on the bug.
getFormattedError
record
test to include more of the error message, and adds a nested example:
) so that it aligns with the "missing key" error message, and so that the full error message is clearer; for examplerather than
which could be read as meaning
["c"]
is the record, for example like "invalid keys in record A" could be read.