UNPKG

1.73 kBJavaScriptView Raw
1import React from 'react';
2import {shallow, mount, render} from 'enzyme';
3import {expect} from 'chai';
4import { Col, Row, Con } from '../src/index';
5
6describe('test con', function () {
7 it('Con',function () {
8 let con = shallow(<Con />);
9 expect(con.hasClass('u-container')).to.equal(true);
10 });
11 it('Con fluid',function () {
12 let con = shallow(<Con fluid />);
13 expect(con.hasClass('u-container-fluid')).to.equal(true);
14 });
15});
16describe('test row', function () {
17 it('row',function () {
18 let row = shallow(<Row />);
19 expect(row.hasClass('u-row')).to.equal(true);
20 });
21});
22describe('test col', function () {
23 it('col md',function () {
24 let colMd = shallow(<Col md={6} />);
25 expect(colMd.hasClass('u-col-md-6')).to.equal(true);
26 });
27 it('col lg',function () {
28 let colLg = shallow(<Col lg={6} />);
29 expect(colLg.hasClass('u-col-lg-6')).to.equal(true);
30 });
31 it('col sm',function () {
32 let colSm = shallow(<Col sm={6} />);
33 expect(colSm.hasClass('u-col-sm-6')).to.equal(true);
34 });
35 it('col xs',function () {
36 let colXs= shallow(<Col xs={6} />);
37 expect(colXs.hasClass('u-col-xs-6')).to.equal(true);
38 });
39 it('col pull',function () {
40 let col = shallow(<Col mdPull={4} md={6} />);
41 expect(col.hasClass('u-col-md-pull-4')).to.equal(true);
42 });
43 it('col push',function () {
44 let col = shallow(<Col mdPush={4} md={6} />);
45 expect(col.hasClass('u-col-md-push-4')).to.equal(true);
46 });
47 it('col offset',function () {
48 let col = shallow(<Col mdOffset={4} md={6} />);
49 expect(col.hasClass('u-col-md-offset-4')).to.equal(true);
50 });
51});