Skip to content

Commit

Permalink
[Table] Increase test coverage. (mui#8910)
Browse files Browse the repository at this point in the history
  • Loading branch information
leMaik authored and the-noob committed Nov 17, 2017
1 parent 2f96f6c commit 12bc480
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Table/Table.spec.js
Expand Up @@ -44,4 +44,9 @@ describe('<Table />', () => {
const wrapper = shallow(<Table>{children}</Table>);
assert.strictEqual(wrapper.childAt(0).equals(children), true);
});

it('should define table in the child context', () => {
const wrapper = shallow(<Table />);
assert.deepStrictEqual(wrapper.instance().getChildContext().table, {});
});
});
5 changes: 5 additions & 0 deletions src/Table/TableBody.spec.js
Expand Up @@ -35,4 +35,9 @@ describe('<TableBody />', () => {
const wrapper = shallow(<TableBody>{children}</TableBody>);
assert.strictEqual(wrapper.childAt(0).equals(children), true);
});

it('should define table.body in the child context', () => {
const wrapper = shallow(<TableBody />);
assert.strictEqual(wrapper.instance().getChildContext().table.body, true);
});
});
5 changes: 5 additions & 0 deletions src/Table/TableHead.spec.js
Expand Up @@ -35,4 +35,9 @@ describe('<TableHead />', () => {
const wrapper = shallow(<TableHead>{children}</TableHead>);
assert.strictEqual(wrapper.childAt(0).equals(children), true);
});

it('should define table.head in the child context', () => {
const wrapper = shallow(<TableHead />);
assert.strictEqual(wrapper.instance().getChildContext().table.head, true);
});
});

0 comments on commit 12bc480

Please sign in to comment.