Skip to content

Commit

Permalink
add testcase, refs #381
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart Veneman committed Jul 4, 2024
1 parent 5cf07e9 commit c516310
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/values/box-shadows.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,23 @@ BoxShadows('finds vendor prefixed values', () => {
assert.equal(actual, expected)
})

BoxShadows.skip('does not report var() fallback values as separate values', () => {
const fixture = `
with-fallback {
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}`
const actual = analyze(fixture).values.boxShadows
const expected = {
total: 1,
unique: {
'var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)': 1,
},
totalUnique: 1,
uniquenessRatio: 1
}
assert.equal(actual, expected)
})

BoxShadows('ignores keywords', () => {
const fixture = `
box-shadows-keyword {
Expand Down

0 comments on commit c516310

Please sign in to comment.