File tree 3 files changed +10
-4
lines changed 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,10 @@ function fuzzyMatches(
31
31
32
32
const normalizedText = normalizer ( textToMatch )
33
33
34
- if ( typeof matcher === 'string' ) {
35
- return normalizedText . toLowerCase ( ) . includes ( matcher . toLowerCase ( ) )
34
+ if ( typeof matcher === 'string' || typeof matcher === 'number' ) {
35
+ return normalizedText
36
+ . toLowerCase ( )
37
+ . includes ( matcher . toString ( ) . toLowerCase ( ) )
36
38
} else if ( typeof matcher === 'function' ) {
37
39
return matcher ( normalizedText , node )
38
40
} else {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export type MatcherFunction = (
6
6
content : string ,
7
7
element : Nullish < Element > ,
8
8
) => boolean
9
- export type Matcher = MatcherFunction | RegExp | string
9
+ export type Matcher = MatcherFunction | RegExp | string | number
10
10
11
11
// Get autocomplete for ARIARole union types, while still supporting another string
12
12
// Ref: https://github.com/microsoft/TypeScript/issues/29729#issuecomment-505826972
Original file line number Diff line number Diff line change 1
1
{
2
- "extends" : " ../tsconfig.json"
2
+ "extends" : " ../tsconfig.json" ,
3
+ "compilerOptions" : {
4
+ "baseUrl" : " ." ,
5
+ "paths" : {"@testing-library/dom" : [" ." ]}
6
+ }
3
7
}
You can’t perform that action at this time.
0 commit comments