We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 430958f commit 7331f95Copy full SHA for 7331f95
2 files changed
src/utils/filter.ts
@@ -1 +1 @@
1
-export const isGenericTagQuery = (key: string) => /^#[a-z]$/.test(key)
+export const isGenericTagQuery = (key: string) => /^#[a-zA-Z]$/.test(key)
test/unit/utils/filter.ts
@@ -0,0 +1,21 @@
+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
+})
0 commit comments