File tree 3 files changed +14
-3
lines changed
3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 26
26
"lie" : " ^3.0.1" ,
27
27
"lru-cache" : " ^2.7.0" ,
28
28
"mocha" : " ^2.3.3" ,
29
- "parsedbf" : " 0.1.1 " ,
29
+ "parsedbf" : " 0.1.2 " ,
30
30
"proj4" : " ^2.1.4" ,
31
31
"testling" : " ^1.6.1" ,
32
32
"uglify-js" : " ^2.4.24"
Original file line number Diff line number Diff line change @@ -102,6 +102,18 @@ describe('Shp', function(){
102
102
return pandr . then ( function ( a ) { return a . features } ) . should . eventually . have . length ( 361 ) ;
103
103
} ) ;
104
104
} ) ;
105
+ describe ( 'empty attributes table' , function ( ) {
106
+ var pandr = shp ( 'http://localhost:3000/files/empty-shp.zip' ) ;
107
+ it ( 'should have the right keys' , function ( ) {
108
+ return pandr . should . eventually . contain . keys ( 'type' , 'features' ) ;
109
+ } ) ;
110
+ it ( 'should be the right type' , function ( ) {
111
+ return pandr . should . eventually . have . property ( 'type' , 'FeatureCollection' ) ;
112
+ } ) ;
113
+ it ( 'should have the right number of features' , function ( ) {
114
+ return pandr . then ( function ( a ) { return a . features } ) . should . eventually . have . length ( 2 ) ;
115
+ } ) ;
116
+ } ) ;
105
117
describe ( 'errors' , function ( ) {
106
118
it ( 'bad file should be rejected' , function ( ) {
107
119
return shp ( 'http://localhost:3000/test/data/bad' ) . should . be . rejected ;
@@ -120,5 +132,4 @@ describe('Shp', function(){
120
132
return shp ( 'http://localhost:3000/test/data/noshp.zip' ) . should . be . rejected ;
121
133
} ) ;
122
134
} ) ;
123
-
124
- } ) ;
135
+ } ) ;
You can’t perform that action at this time.
0 commit comments