File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
- import ChartComponent from " ../Chart" ;
1
+ import ChartComponent from ' ../Chart' ;
2
2
3
3
describe ( 'Chart re-rendering' , ( ) => {
4
4
@@ -16,33 +16,33 @@ describe('Chart re-rendering', () => {
16
16
17
17
it ( 'required when data is changed in an inner object/array of the data' , ( ) => {
18
18
const originalData = {
19
- " data" : {
20
- " datasets" : [
19
+ ' data' : {
20
+ ' datasets' : [
21
21
{
22
- " data" : [
22
+ ' data' : [
23
23
122968
24
24
]
25
25
} ,
26
26
{
27
- " data" : [
27
+ ' data' : [
28
28
14738
29
29
]
30
30
}
31
31
]
32
32
}
33
- }
33
+ } ;
34
34
// The new data has only one data set instead of two
35
35
const newData = {
36
- " data" : {
37
- " datasets" : [
36
+ ' data' : {
37
+ ' datasets' : [
38
38
{
39
- " data" : [
39
+ ' data' : [
40
40
122968
41
41
]
42
42
}
43
43
]
44
44
}
45
- }
45
+ } ;
46
46
const chart = new ChartComponent ( originalData ) ;
47
47
const updateRequired = chart . shouldComponentUpdate ( newData ) ;
48
48
expect ( updateRequired ) . toBeTruthy ( ) ;
You can’t perform that action at this time.
0 commit comments