mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
test: update assertion for handling unknown component types in generateComponentTree tests
This commit is contained in:
@@ -107,7 +107,9 @@ describe('generateComponentTree', () => {
|
||||
const reactElement = generateComponentTree(luaComponent)
|
||||
|
||||
expect(reactElement.type).toBe('div')
|
||||
expect(reactElement.props.children).toContain('Unknown component: UnknownComponent')
|
||||
// Children is an array: ["Unknown component: ", "UnknownComponent"]
|
||||
expect(Array.isArray(reactElement.props.children)).toBe(true)
|
||||
expect(reactElement.props.children.join('')).toBe('Unknown component: UnknownComponent')
|
||||
})
|
||||
|
||||
it('should generate complex nested structure', () => {
|
||||
|
||||
Reference in New Issue
Block a user