Skip to content

Commit eac398e

Browse files
Initial plan for fixing test failures
Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
1 parent eaea851 commit eac398e

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { describe, it, expect } from 'vitest';
2+
import { render } from '@testing-library/react';
3+
import { ComponentRegistry } from '@object-ui/core';
4+
5+
describe('Debug Test', () => {
6+
it('should show what component returns', () => {
7+
const Component = ComponentRegistry.get('image');
8+
console.log('=== DEBUG: Component type ===', typeof Component);
9+
console.log('=== DEBUG: Component ===', Component);
10+
11+
if (Component) {
12+
const { container } = render(<Component schema={{ type: 'image', src: 'test.jpg', alt: 'test' }} />);
13+
console.log('=== DEBUG: Container HTML ===', container.innerHTML);
14+
console.log('=== DEBUG: Container text ===', container.textContent);
15+
console.log('=== DEBUG: Has img ===', container.querySelector('img'));
16+
}
17+
18+
expect(true).toBe(true);
19+
});
20+
});

0 commit comments

Comments
 (0)