Skip to content

Commit e8cb5a2

Browse files
authored
Merge pull request #186 from chuanyu0201/feat/test-case
chore: length validate add vh case
2 parents 1d38a24 + e2a4135 commit e8cb5a2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ coverage
44
node_modules/
55
.DS_Store
66
*.local
7+
.idea

tests/validators.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ describe('validators', () => {
2929
expect(isLength('[481px]')).toBe(true)
3030
expect(isLength('[19.1rem]')).toBe(true)
3131
expect(isLength('[50vw]')).toBe(true)
32+
expect(isLength('[56vh]')).toBe(true)
3233
expect(isLength('[length:var(--arbitrary)]')).toBe(true)
3334

3435
expect(isLength('1d5')).toBe(false)
@@ -43,6 +44,7 @@ describe('validators', () => {
4344
expect(isArbitraryLength('[481px]')).toBe(true)
4445
expect(isArbitraryLength('[19.1rem]')).toBe(true)
4546
expect(isArbitraryLength('[50vw]')).toBe(true)
47+
expect(isArbitraryLength('[56vh]')).toBe(true)
4648
expect(isArbitraryLength('[length:var(--arbitrary)]')).toBe(true)
4749

4850
expect(isArbitraryLength('1')).toBe(false)

0 commit comments

Comments
 (0)