mirror of https://github.com/alibaba/ice.git
23 lines
499 B
TypeScript
23 lines
499 B
TypeScript
/**
|
|
* @vitest-environment jsdom
|
|
*/
|
|
|
|
import { expect, it, describe } from 'vitest';
|
|
import React from 'react';
|
|
import { render } from '@testing-library/react';
|
|
import Fragment from '../src/fragment';
|
|
|
|
describe('fragment', () => {
|
|
it('basic', () => {
|
|
function App() {
|
|
return (<Fragment>
|
|
<header>A heading</header>
|
|
<footer>A footer</footer>
|
|
</Fragment>);
|
|
}
|
|
|
|
const wrapper = render(<App />);
|
|
expect(wrapper.container.childNodes.length).toBe(2);
|
|
});
|
|
});
|