1 | const React = require('react');
|
2 | const { expect } = require('chai');
|
3 | const { shallow } = require('enzyme');
|
4 | const { Value } = require('../');
|
5 |
|
6 | describe('<Value /> (rendering null)', () => {
|
7 | const component = shallow(<Value type="Null" value={null} />);
|
8 |
|
9 | it('sets the base class', () => {
|
10 | expect(component.hasClass('element-value')).to.equal(true);
|
11 | });
|
12 |
|
13 | it('sets the type class', () => {
|
14 | expect(component.hasClass('element-value-is-null')).to.equal(true);
|
15 | });
|
16 |
|
17 | it('sets the title', () => {
|
18 | expect(component.props().title).to.equal('null');
|
19 | });
|
20 |
|
21 | it('sets the value', () => {
|
22 | expect(component.text()).to.equal('null');
|
23 | });
|
24 | });
|
25 |
|
\ | No newline at end of file |