@@ -21,17 +21,17 @@ describe('Test plot structure', function() {
21
21
22
22
it ( 'has one *subplot xy* node' , function ( ) {
23
23
var nodes = d3 . selectAll ( 'g.subplot.xy' ) ;
24
- expect ( nodes [ 0 ] . length ) . toEqual ( 1 ) ;
24
+ expect ( nodes . size ( ) ) . toEqual ( 1 ) ;
25
25
} ) ;
26
26
27
27
it ( 'has one *scatterlayer* node' , function ( ) {
28
28
var nodes = d3 . selectAll ( 'g.scatterlayer' ) ;
29
- expect ( nodes [ 0 ] . length ) . toEqual ( 1 ) ;
29
+ expect ( nodes . size ( ) ) . toEqual ( 1 ) ;
30
30
} ) ;
31
31
32
32
it ( 'has as many *trace scatter* nodes as there are traces' , function ( ) {
33
33
var nodes = d3 . selectAll ( 'g.trace.scatter' ) ;
34
- expect ( nodes [ 0 ] . length ) . toEqual ( mock . data . length ) ;
34
+ expect ( nodes . size ( ) ) . toEqual ( mock . data . length ) ;
35
35
} ) ;
36
36
37
37
it ( 'has as many *point* nodes as there are traces' , function ( ) {
@@ -42,7 +42,7 @@ describe('Test plot structure', function() {
42
42
Npts += trace . x . length ;
43
43
} ) ;
44
44
45
- expect ( nodes [ 0 ] . length ) . toEqual ( Npts ) ;
45
+ expect ( nodes . size ( ) ) . toEqual ( Npts ) ;
46
46
} ) ;
47
47
} ) ;
48
48
@@ -61,7 +61,7 @@ describe('Test plot structure', function() {
61
61
Npts += trace . values . length ;
62
62
} ) ;
63
63
64
- expect ( nodes [ 0 ] . length ) . toEqual ( Npts ) ;
64
+ expect ( nodes . size ( ) ) . toEqual ( Npts ) ;
65
65
} ) ;
66
66
} ) ;
67
67
} ) ;
@@ -82,7 +82,7 @@ describe('Test plot structure', function() {
82
82
if ( items ) Npts += items . length ;
83
83
} ) ;
84
84
85
- expect ( nodes [ 0 ] . length ) . toEqual ( Npts ) ;
85
+ expect ( nodes . size ( ) ) . toEqual ( Npts ) ;
86
86
} ) ;
87
87
88
88
it ( 'has as many *point* nodes as there are marker points' , function ( ) {
@@ -94,7 +94,7 @@ describe('Test plot structure', function() {
94
94
if ( items ) Npts += items . length ;
95
95
} ) ;
96
96
97
- expect ( nodes [ 0 ] . length ) . toEqual ( Npts ) ;
97
+ expect ( nodes . size ( ) ) . toEqual ( Npts ) ;
98
98
} ) ;
99
99
} ) ;
100
100
@@ -113,7 +113,7 @@ describe('Test plot structure', function() {
113
113
Npts += trace . r . length ;
114
114
} ) ;
115
115
116
- expect ( nodes [ 0 ] . length ) . toEqual ( Npts ) ;
116
+ expect ( nodes . size ( ) ) . toEqual ( Npts ) ;
117
117
} ) ;
118
118
} ) ;
119
119
} ) ;
0 commit comments