mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +00:00
21 lines
659 B
TypeScript
21 lines
659 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import components from '../seed/components.json'
|
|
|
|
describe('Codegen Studio Components', () => {
|
|
it('should be a valid array', () => {
|
|
expect(components).toBeInstanceOf(Array)
|
|
})
|
|
|
|
it('should have valid component structure if components exist', () => {
|
|
if (components.length > 0) {
|
|
components.forEach((component: any) => {
|
|
expect(component.id).toBeDefined()
|
|
expect(component.type).toBeDefined()
|
|
expect(typeof component.id).toBe('string')
|
|
expect(typeof component.type).toBe('string')
|
|
expect(component.children).toBeInstanceOf(Array)
|
|
})
|
|
}
|
|
})
|
|
})
|