@@ -39,9 +39,7 @@ describe('wkt', () => {
39
39
] ;
40
40
for ( const x of wkts ) {
41
41
const d = lib . DirectGeometryFromWKTString . decode ( x ) ;
42
- if ( isRight ( d ) ) {
43
- assert . deepStrictEqual ( d . right , { } , x ) ;
44
- }
42
+ assert . ok ( isLeft ( d ) ) ;
45
43
}
46
44
} ) ;
47
45
describe ( 'fuzzing' , async ( ) => {
@@ -77,11 +75,6 @@ describe('wkt', () => {
77
75
78
76
const d = lib . DirectGeometryFromWKTString . decode ( x ) ;
79
77
if ( ! isRight ( d ) ) {
80
- assert . deepStrictEqual (
81
- { } ,
82
- gjd . right ,
83
- 'could not decode the WKT: ' + x
84
- ) ;
85
78
throw new Error ( ) ;
86
79
}
87
80
assert . deepStrictEqual ( d . right , expected ) ;
@@ -112,9 +105,7 @@ describe('wkt', () => {
112
105
] ;
113
106
for ( const x of wkts ) {
114
107
const d = lib . GeometryFromWKTString . decode ( x ) ;
115
- if ( isRight ( d ) ) {
116
- assert . deepStrictEqual ( d . right , { } , x ) ;
117
- }
108
+ assert . ok ( isLeft ( d ) ) ;
118
109
}
119
110
} ) ;
120
111
describe ( 'fuzzing' , async ( ) => {
@@ -157,11 +148,6 @@ describe('wkt', () => {
157
148
158
149
const d = lib . GeometryFromWKTString . decode ( x ) ;
159
150
if ( ! isRight ( d ) ) {
160
- assert . deepStrictEqual (
161
- { } ,
162
- gjd . right ,
163
- 'could not decode the WKT: ' + x
164
- ) ;
165
151
throw new Error ( ) ;
166
152
}
167
153
assert . deepStrictEqual ( d . right , expected ) ;
@@ -183,9 +169,7 @@ describe('wkt', () => {
183
169
] ;
184
170
for ( const x of wkts ) {
185
171
const d = lib . WKTStringFromGeometry . decode ( x ) ;
186
- if ( isRight ( d ) ) {
187
- assert . deepStrictEqual ( d . right , { } , x ) ;
188
- }
172
+ assert . ok ( isLeft ( d ) ) ;
189
173
}
190
174
} ) ;
191
175
describe ( 'fuzzing' , async ( ) => {
@@ -198,10 +182,7 @@ describe('wkt', () => {
198
182
for ( const i of new Array ( fuzzCount ) . keys ( ) ) {
199
183
const gju = gen . encode ( [ i , fuzzCtx ] ) ;
200
184
const d = lib . WKTStringFromGeometry . decode ( gju ) ;
201
- if ( ! isRight ( d ) ) {
202
- assert . deepStrictEqual ( { } , gju , 'could not decode the WKT' ) ;
203
- throw new Error ( ) ;
204
- }
185
+ assert . ok ( isRight ( d ) ) ;
205
186
}
206
187
} ) ;
207
188
@@ -254,9 +235,7 @@ describe('wkt', () => {
254
235
] ;
255
236
for ( const x of wkts ) {
256
237
const d = lib . WKT . decode ( x ) ;
257
- if ( isRight ( d ) ) {
258
- assert . deepStrictEqual ( d . right , { } , x ) ;
259
- }
238
+ assert . ok ( isLeft ( d ) ) ;
260
239
}
261
240
} ) ;
262
241
} ) ;
0 commit comments