forked from muicss/mui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-panel.js
More file actions
44 lines (32 loc) · 1.02 KB
/
test-panel.js
File metadata and controls
44 lines (32 loc) · 1.02 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* MUI test react panel library
* @module test/react-tests/test-panel
*/
import assert from 'assert';
import React from 'react';
import Panel from '../../src/react/panel';
import { getShallowRendererOutput } from '../lib/react-helpers';
describe('react/panel', function() {
it('renders properly', function() {
let result = getShallowRendererOutput(<Panel>test</Panel>);
assert.equal(result.type, 'div');
assert.equal(result.props.className, 'mui-panel ');
assert.equal(result.props.children, 'test');
});
it('renders properly with additional classNames', function() {
let result = getShallowRendererOutput(
<Panel className="additional">
test
</Panel>
);
assert.equal(result.props.className, 'mui-panel additional');
});
it('renders properly with additional styles', function() {
let result = getShallowRendererOutput(
<Panel style={{additonal: 'style'}}>
test
</Panel>
);
assert.equal(result.props.style.additonal, 'style');
});
});