Remove custom matcher usage from jest-extended and one custom matcher that we define in repo.
This lets us have a simpler test harness.
Replace the one usage of jest-extended's toBeObject with a call to expect(BLAH).toMatchObject()
Replace the five usages of jest-extended'stoBeOneOf with setting up an array of possible items and using expect(possibleResults).toStrictEqual(expect.arrayContaining([VALUE_UNDER_TEST])); which is a little bit upside down but considering it only crops up 5 times I'm not bothered by it.
Remove the two assertions that use toBeArrayOfUniqueItems as they both do Object.keys(SOME_OBJECT).toBeArrayOfUniqueItems() and that array is always going to be unique because an object can't have multiple keys with the same value so we're asserting a truism.
Description
Remove custom matcher usage from
jest-extended
and one custom matcher that we define in repo. This lets us have a simpler test harness.jest-extended
'stoBeObject
with a call toexpect(BLAH).toMatchObject()
jest-extended's
toBeOneOf
with setting up an array of possible items and usingexpect(possibleResults).toStrictEqual(expect.arrayContaining([VALUE_UNDER_TEST]));
which is a little bit upside down but considering it only crops up 5 times I'm not bothered by it.toBeArrayOfUniqueItems
as they both doObject.keys(SOME_OBJECT).toBeArrayOfUniqueItems()
and that array is always going to be unique because an object can't have multiple keys with the same value so we're asserting a truism.