Skip to content

Commit 3ca5bb0

Browse files
authored
Add support for data-testid used by default in react-testing-library
This changes are convenient for users of react-testing-library, so they won't have to configure it.
1 parent f7649d2 commit 3ca5bb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const getAttributeIdentifiers = options => {
2-
if(!options || typeof(options.attributes) === 'undefined') return ['data-test-id'];
2+
if(!options || typeof(options.attributes) === 'undefined') return ['data-test-id', 'data-testid'];
33

44
if(Array.isArray(options.attributes)) {
55
if(options.attributes.length === 0) {

0 commit comments

Comments
 (0)