Skip to content

Commit baf022d

Browse files
authored
test: Ensure unique element names (#457)
1 parent cabe6ec commit baf022d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/elements.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { ElementDefinition } from 'lib/element.js'
2+
import * as components from 'lib/seam/components/elements.js'
3+
4+
test('unique element names', async () => {
5+
const elementDefinitions = components as unknown as Record<
6+
string,
7+
Partial<ElementDefinition>
8+
>
9+
const elementNames = Object.values(elementDefinitions).map(({ name }) => name)
10+
expect(elementNames).toEqual(Array.from(new Set(elementNames)))
11+
})

0 commit comments

Comments
 (0)