File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1- export const isGenericTagQuery = ( key : string ) => / ^ # [ a - z ] $ / . test ( key )
1+ export const isGenericTagQuery = ( key : string ) => / ^ # [ a - z A - Z ] $ / . test ( key )
Original file line number Diff line number Diff line change 1+ import { expect } from 'chai'
2+
3+ import { isGenericTagQuery } from '../../../src/utils/filter'
4+
5+ describe ( 'isGenericTagQuery' , ( ) => {
6+ it ( 'returns true for #a' , ( ) => {
7+ expect ( isGenericTagQuery ( '#a' ) ) . to . be . true
8+ } )
9+
10+ it ( 'returns true for #A' , ( ) => {
11+ expect ( isGenericTagQuery ( '#A' ) ) . to . be . true
12+ } )
13+
14+ it ( 'returns false for #0' , ( ) => {
15+ expect ( isGenericTagQuery ( '#0' ) ) . to . be . false
16+ } )
17+
18+ it ( 'returns false for #abc' , ( ) => {
19+ expect ( isGenericTagQuery ( '#abc' ) ) . to . be . false
20+ } )
21+ } )
You can’t perform that action at this time.
0 commit comments