forked from muicss/mui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-form.js
More file actions
51 lines (36 loc) · 1.17 KB
/
test-form.js
File metadata and controls
51 lines (36 loc) · 1.17 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
45
46
47
48
49
50
51
/**
* MUI test react form component
* @module test/react-tests/test-form
*/
import assert from 'assert';
import React from 'react';
import Form from '../../src/react/form';
import { getShallowRendererOutput } from '../lib/react-helpers';
describe('react/form', function() {
it('renders wrapper properly', function() {
let result = getShallowRendererOutput(<Form></Form>);
assert.equal(result.type, 'form');
assert.equal(result.props.className, ' ');
});
it('renders properly with additional classNames', function() {
let result = getShallowRendererOutput(
<Form className="additional">
test
</Form>
);
assert.equal(result.props.className, ' additional');
});
it('renders properly with additional styles', function() {
let result = getShallowRendererOutput(
<Form style={{additonal: 'style'}}>
test
</Form>
);
assert.equal(result.props.style.additonal, 'style');
});
it('handles inline option', function() {
let result = getShallowRendererOutput(<Form inline={ true }></Form>);
assert.equal(result.type, 'form');
assert.equal(result.props.className, 'mui-form--inline ')
});
});