From 88dbed3a8bc7ea93894f45e2031818156e1cbff5 Mon Sep 17 00:00:00 2001 From: acatalina Date: Mon, 7 Sep 2020 09:09:26 +0100 Subject: [PATCH 1/6] getAllByTestId supports a regex matcher --- src/__tests__/getByApi.test.js | 14 ++++++++++++++ src/helpers/getByAPI.js | 14 ++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/__tests__/getByApi.test.js b/src/__tests__/getByApi.test.js index db66b1c69..d39836c6e 100644 --- a/src/__tests__/getByApi.test.js +++ b/src/__tests__/getByApi.test.js @@ -35,3 +35,17 @@ test('getByTestId returns only native elements', () => { 'No instances found with testID: myComponent' ); }); + +test('getAllByTestId supports a regex matcher', () => { + const { getAllByTestId } = render( + + Text + + +