Skip to content

Commit c9e9b6e

Browse files
committed
Add test for duplicate properties
1 parent 293c244 commit c9e9b6e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

__tests__/index.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { test } from 'node:test'
33

44
import stylelint from 'stylelint'
55

6+
import groups from '../groups.js'
67
import config from '../index.js'
78
import { correctOrder, incorrectOrder } from './_fixtures.js'
89

@@ -36,3 +37,10 @@ test('with correct property order', async () => {
3637
'it indicates no specific errors',
3738
)
3839
})
40+
41+
test('no duplicate properties', async () => {
42+
let propertiesArray = groups.flatMap((group) => group.properties)
43+
let propertiesSet = new Set(propertiesArray)
44+
45+
assert.strictEqual(propertiesArray.length, propertiesSet.size)
46+
})

0 commit comments

Comments
 (0)