bc518174
王天杨
提交两个项目文件
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import { customRender } from 'test/render';
import { getTableFooter, queryTableFooter } from 'test/selectors';
import { Footer } from './Footer';
customRender(
<table role="grid">
<Footer />
</table>
);
test('should not render anything as default', () => {
expect(queryTableFooter()).toBeNull();
});
describe('when using the `footer` prop', () => {
beforeEach(() => {
customRender(
<table role="grid">
<Footer />
</table>,
{ footer: 'footer_foo' }
);
});
test('should render the table footer', () => {
expect(getTableFooter()).toHaveTextContent('footer_foo');
});
});
|