From fed01f2c5adfa2ee14c61bb8250f3281f95ddca4 Mon Sep 17 00:00:00 2001 From: Dan Dascalescu Date: Mon, 12 Jun 2017 02:40:47 -0700 Subject: [PATCH] Point out you can use matchers in .toMatchObject (#3796) --- docs/en/ExpectAPI.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/ExpectAPI.md b/docs/en/ExpectAPI.md index a5ca873bb811..5d0117e55e39 100644 --- a/docs/en/ExpectAPI.md +++ b/docs/en/ExpectAPI.md @@ -707,7 +707,7 @@ describe('grapefruits are healthy', () => { ### `.toMatchObject(object)` -Use `.toMatchObject` to check that a JavaScript object matches a subset of the properties of an object. +Use `.toMatchObject` to check that a JavaScript object matches a subset of the properties of an object. You can match properties against values or against matchers. ```js const houseForSale = { @@ -723,7 +723,7 @@ const desiredHouse = { bath: true, kitchen: { amenities: ['oven', 'stove', 'washer'], - wallColor: 'white', + wallColor: expect.stringMatching(/white|yellow/), }, };