forked from muicss/mui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-appbar.js
More file actions
44 lines (32 loc) · 1.03 KB
/
test-appbar.js
File metadata and controls
44 lines (32 loc) · 1.03 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 appbar library
* @module test/react-tests/test-appbar
*/
import assert from 'assert';
import React from 'react';
import Appbar from '../../src/react/appbar';
import { getShallowRendererOutput } from '../lib/react-helpers';
describe('react/appbar', function() {
it('renders properly', function() {
let result = getShallowRendererOutput(<Appbar>test</Appbar>);
assert.equal(result.type, 'div');
assert.equal(result.props.className, 'mui-appbar ')
assert.equal(result.props.children, 'test');
});
it('renders properly with additional classNames', function() {
let result = getShallowRendererOutput(
<Appbar className="additional">
test
</Appbar>
);
assert.equal(result.props.className, 'mui-appbar additional');
});
it('renders properly with additional styles', function() {
let result = getShallowRendererOutput(
<Appbar style={{additonal: 'style'}}>
test
</Appbar>
);
assert.equal(result.props.style.additonal, 'style');
});
});