@@ -2,7 +2,6 @@ import React from 'react';
22import { shallow } from 'enzyme' ;
33
44import Caption from '../src/caption' ;
5- import Store from '../src/store' ;
65import Header from '../src/header' ;
76import Body from '../src/body' ;
87import BootstrapTable from '../src/bootstrap-table' ;
@@ -25,13 +24,10 @@ describe('BootstrapTable', () => {
2524 name : 'B'
2625 } ] ;
2726
28- const store = new Store ( 'id' ) ;
29- store . data = data ;
30-
3127 describe ( 'simplest table' , ( ) => {
3228 beforeEach ( ( ) => {
3329 wrapper = shallow (
34- < BootstrapTable keyField = "id" columns = { columns } data = { data } store = { store } /> ) ;
30+ < BootstrapTable keyField = "id" columns = { columns } data = { data } /> ) ;
3531 } ) ;
3632
3733 it ( 'should render successfully' , ( ) => {
@@ -41,11 +37,6 @@ describe('BootstrapTable', () => {
4137 expect ( wrapper . find ( Body ) . length ) . toBe ( 1 ) ;
4238 } ) ;
4339
44- it ( 'should have correct default state' , ( ) => {
45- expect ( wrapper . state ( ) . data ) . toBeDefined ( ) ;
46- expect ( wrapper . state ( ) . data ) . toEqual ( store . data ) ;
47- } ) ;
48-
4940 it ( "should only have classes 'table' and 'table-bordered' as default" , ( ) => {
5041 expect ( wrapper . find ( 'table' ) . prop ( 'className' ) ) . toBe ( 'table table-bordered' ) ;
5142 } ) ;
@@ -64,7 +55,6 @@ describe('BootstrapTable', () => {
6455 keyField = "id"
6556 columns = { columns }
6657 data = { data }
67- store = { store }
6858 classes = { classes }
6959 /> ) ;
7060 } ) ;
@@ -83,7 +73,6 @@ describe('BootstrapTable', () => {
8373 keyField = "id"
8474 columns = { columns }
8575 data = { data }
86- store = { store }
8776 wrapperClasses = { classes }
8877 /> ) ;
8978 } ) ;
@@ -102,7 +91,6 @@ describe('BootstrapTable', () => {
10291 keyField = "id"
10392 columns = { columns }
10493 data = { data }
105- store = { store }
10694 id = { id }
10795 /> ) ;
10896 } ) ;
@@ -115,7 +103,7 @@ describe('BootstrapTable', () => {
115103 describe ( 'when hover props is true' , ( ) => {
116104 beforeEach ( ( ) => {
117105 wrapper = shallow (
118- < BootstrapTable keyField = "id" columns = { columns } data = { data } store = { store } hover /> ) ;
106+ < BootstrapTable keyField = "id" columns = { columns } data = { data } hover /> ) ;
119107 } ) ;
120108
121109 it ( 'should have table-hover class on table' , ( ) => {
@@ -126,7 +114,7 @@ describe('BootstrapTable', () => {
126114 describe ( 'when striped props is true' , ( ) => {
127115 beforeEach ( ( ) => {
128116 wrapper = shallow (
129- < BootstrapTable keyField = "id" columns = { columns } data = { data } store = { store } striped /> ) ;
117+ < BootstrapTable keyField = "id" columns = { columns } data = { data } striped /> ) ;
130118 } ) ;
131119
132120 it ( 'should have table-striped class on table' , ( ) => {
@@ -137,7 +125,7 @@ describe('BootstrapTable', () => {
137125 describe ( 'when condensed props is true' , ( ) => {
138126 beforeEach ( ( ) => {
139127 wrapper = shallow (
140- < BootstrapTable keyField = "id" columns = { columns } data = { data } store = { store } condensed /> ) ;
128+ < BootstrapTable keyField = "id" columns = { columns } data = { data } condensed /> ) ;
141129 } ) ;
142130
143131 it ( 'should have table-condensed class on table' , ( ) => {
@@ -148,7 +136,7 @@ describe('BootstrapTable', () => {
148136 describe ( 'when bordered props is false' , ( ) => {
149137 beforeEach ( ( ) => {
150138 wrapper = shallow (
151- < BootstrapTable keyField = "id" columns = { columns } data = { data } store = { store } bordered = { false } /> ) ;
139+ < BootstrapTable keyField = "id" columns = { columns } data = { data } bordered = { false } /> ) ;
152140 } ) ;
153141
154142 it ( 'should not have table-condensed class on table' , ( ) => {
@@ -160,7 +148,6 @@ describe('BootstrapTable', () => {
160148 beforeEach ( ( ) => {
161149 wrapper = shallow (
162150 < BootstrapTable
163- store = { store }
164151 caption = { < span className = "table-caption" > test</ span > }
165152 keyField = "id"
166153 columns = { columns }
0 commit comments