mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2026-01-09 21:48:11 +00:00
Merge pull request #97 from mokinzhao/master
update:clean test use case
This commit is contained in:
commit
8e7e1ceb52
@ -1,14 +0,0 @@
|
||||
import BasicLayout from '..';
|
||||
import renderer from 'react-test-renderer';
|
||||
|
||||
describe('Layout: BasicLayout', () => {
|
||||
it('Render correctly', () => {
|
||||
const wrapper = renderer.create(<BasicLayout />);
|
||||
expect(wrapper.root.children.length).toBe(1);
|
||||
const outerLayer = wrapper.root.children[0];
|
||||
expect(outerLayer.type).toBe('div');
|
||||
const title = outerLayer.children[0];
|
||||
expect(title.type).toBe('h1');
|
||||
expect(title.children[0]).toBe('Yay! Welcome to umi!');
|
||||
});
|
||||
});
|
||||
@ -1,14 +0,0 @@
|
||||
import Index from '..';
|
||||
import renderer from 'react-test-renderer';
|
||||
|
||||
|
||||
describe('Page: index', () => {
|
||||
it('Render correctly', () => {
|
||||
const wrapper = renderer.create(<Index />);
|
||||
expect(wrapper.root.children.length).toBe(1);
|
||||
const outerLayer = wrapper.root.children[0];
|
||||
expect(outerLayer.type).toBe('div');
|
||||
expect(outerLayer.children.length).toBe(2);
|
||||
|
||||
});
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user