@@ -25,9 +25,9 @@ Deno.test("decodeBigint", function () {
25
25
Deno . test ( "decodeBigintArray" , function ( ) {
26
26
assertEquals (
27
27
decodeBigintArray (
28
- "{17365398509481972,9007199254740992,-10414398509481984}"
28
+ "{17365398509481972,9007199254740992,-10414398509481984}" ,
29
29
) ,
30
- [ 17365398509481972n , 9007199254740992n , - 10414398509481984n ]
30
+ [ 17365398509481972n , 9007199254740992n , - 10414398509481984n ] ,
31
31
) ;
32
32
} ) ;
33
33
@@ -62,25 +62,25 @@ Deno.test("decodeBox", function () {
62
62
assertThrows (
63
63
( ) => decodeBox ( testValue ) ,
64
64
Error ,
65
- `Invalid Box: "${ testValue } ". Box must have only 2 point, 1 given.`
65
+ `Invalid Box: "${ testValue } ". Box must have only 2 point, 1 given.` ,
66
66
) ;
67
67
testValue = "(12.4,2),(123,123,123),(9303,33)" ;
68
68
assertThrows (
69
69
( ) => decodeBox ( testValue ) ,
70
70
Error ,
71
- `Invalid Box: "${ testValue } ". Box must have only 2 point, 3 given.`
71
+ `Invalid Box: "${ testValue } ". Box must have only 2 point, 3 given.` ,
72
72
) ;
73
73
testValue = "(0,0),(123,123,123)" ;
74
74
assertThrows (
75
75
( ) => decodeBox ( testValue ) ,
76
76
Error ,
77
- `Invalid Box: "${ testValue } " : Invalid Point: "(123,123,123)". Points must have only 2 coordinates, 3 given.`
77
+ `Invalid Box: "${ testValue } " : Invalid Point: "(123,123,123)". Points must have only 2 coordinates, 3 given.` ,
78
78
) ;
79
79
testValue = "(0,0),(100,r100)" ;
80
80
assertThrows (
81
81
( ) => decodeBox ( testValue ) ,
82
82
Error ,
83
- `Invalid Box: "${ testValue } " : Invalid Point: "(100,r100)". Coordinate "r100" must be a valid number.`
83
+ `Invalid Box: "${ testValue } " : Invalid Point: "(100,r100)". Coordinate "r100" must be a valid number.` ,
84
84
) ;
85
85
} ) ;
86
86
@@ -93,13 +93,13 @@ Deno.test("decodeCircle", function () {
93
93
assertThrows (
94
94
( ) => decodeCircle ( testValue ) ,
95
95
Error ,
96
- `Invalid Circle: "${ testValue } " : Invalid Point: "(c21 23,2)". Coordinate "c21 23" must be a valid number.`
96
+ `Invalid Circle: "${ testValue } " : Invalid Point: "(c21 23,2)". Coordinate "c21 23" must be a valid number.` ,
97
97
) ;
98
98
testValue = "<(33,2),mn23 3.5>" ;
99
99
assertThrows (
100
100
( ) => decodeCircle ( testValue ) ,
101
101
Error ,
102
- `Invalid Circle: "${ testValue } ". Circle radius "mn23 3.5" must be a valid number.`
102
+ `Invalid Circle: "${ testValue } ". Circle radius "mn23 3.5" must be a valid number.` ,
103
103
) ;
104
104
} ) ;
105
105
@@ -110,11 +110,11 @@ Deno.test("decodeDate", function () {
110
110
Deno . test ( "decodeDatetime" , function ( ) {
111
111
assertEquals (
112
112
decodeDatetime ( "2021-08-01" ) ,
113
- new Date ( "2021-08-01 00:00:00-00" )
113
+ new Date ( "2021-08-01 00:00:00-00" ) ,
114
114
) ;
115
115
assertEquals (
116
116
decodeDatetime ( "1997-12-17 07:37:16-08" ) ,
117
- new Date ( "1997-12-17 07:37:16-08" )
117
+ new Date ( "1997-12-17 07:37:16-08" ) ,
118
118
) ;
119
119
} ) ;
120
120
@@ -131,14 +131,14 @@ Deno.test("decodeInt", function () {
131
131
Deno . test ( "decodeJson" , function ( ) {
132
132
assertEquals (
133
133
decodeJson (
134
- '{"key_1": "MY VALUE", "key_2": null, "key_3": 10, "key_4": {"subkey_1": true, "subkey_2": ["1",2]}}'
134
+ '{"key_1": "MY VALUE", "key_2": null, "key_3": 10, "key_4": {"subkey_1": true, "subkey_2": ["1",2]}}' ,
135
135
) ,
136
136
{
137
137
key_1 : "MY VALUE" ,
138
138
key_2 : null ,
139
139
key_3 : 10 ,
140
140
key_4 : { subkey_1 : true , subkey_2 : [ "1" , 2 ] } ,
141
- }
141
+ } ,
142
142
) ;
143
143
assertThrows ( ( ) => decodeJson ( "{ 'eqw' ; ddd}" ) ) ;
144
144
} ) ;
@@ -149,13 +149,13 @@ Deno.test("decodeLine", function () {
149
149
assertThrows (
150
150
( ) => decodeLine ( "{100,50,0,100}" ) ,
151
151
Error ,
152
- `Invalid Line: "${ testValue } ". Line in linear equation format must have 3 constants, 4 given.`
152
+ `Invalid Line: "${ testValue } ". Line in linear equation format must have 3 constants, 4 given.` ,
153
153
) ;
154
154
testValue = "{100,d3km,0}" ;
155
155
assertThrows (
156
156
( ) => decodeLine ( testValue ) ,
157
157
Error ,
158
- `Invalid Line: "${ testValue } ". Line constant "d3km" must be a valid number.`
158
+ `Invalid Line: "${ testValue } ". Line constant "d3km" must be a valid number.` ,
159
159
) ;
160
160
} ) ;
161
161
@@ -168,26 +168,25 @@ Deno.test("decodeLineSegment", function () {
168
168
assertThrows (
169
169
( ) => decodeLineSegment ( testValue ) ,
170
170
Error ,
171
- `Invalid Line Segment: "${ testValue } " : Invalid Point: "(r344,350)". Coordinate "r344" must be a valid number.`
172
-
171
+ `Invalid Line Segment: "${ testValue } " : Invalid Point: "(r344,350)". Coordinate "r344" must be a valid number.` ,
173
172
) ;
174
173
testValue = "((100),(r344,350))" ;
175
174
assertThrows (
176
175
( ) => decodeLineSegment ( testValue ) ,
177
176
Error ,
178
- `Invalid Line Segment: "${ testValue } " : Invalid Point: "(100)". Points must have only 2 coordinates, 1 given.`
177
+ `Invalid Line Segment: "${ testValue } " : Invalid Point: "(100)". Points must have only 2 coordinates, 1 given.` ,
179
178
) ;
180
179
testValue = "((100,50))" ;
181
180
assertThrows (
182
181
( ) => decodeLineSegment ( testValue ) ,
183
182
Error ,
184
- `Invalid Line Segment: "${ testValue } ". Line segments must have only 2 point, 1 given.`
183
+ `Invalid Line Segment: "${ testValue } ". Line segments must have only 2 point, 1 given.` ,
185
184
) ;
186
185
testValue = "((100,50),(350,350),(100,100))" ;
187
186
assertThrows (
188
187
( ) => decodeLineSegment ( testValue ) ,
189
188
Error ,
190
- `Invalid Line Segment: "${ testValue } ". Line segments must have only 2 point, 3 given.`
189
+ `Invalid Line Segment: "${ testValue } ". Line segments must have only 2 point, 3 given.` ,
191
190
) ;
192
191
} ) ;
193
192
@@ -205,13 +204,13 @@ Deno.test("decodePath", function () {
205
204
assertThrows (
206
205
( ) => decodePath ( testValue ) ,
207
206
Error ,
208
- `Invalid Path: "${ testValue } " : Invalid Point: "(350,kjf334)". Coordinate "kjf334" must be a valid number.`
207
+ `Invalid Path: "${ testValue } " : Invalid Point: "(350,kjf334)". Coordinate "kjf334" must be a valid number.` ,
209
208
) ;
210
209
testValue = "((100,50,9949))" ;
211
210
assertThrows (
212
211
( ) => decodePath ( testValue ) ,
213
212
Error ,
214
- `Invalid Path: "${ testValue } " : Invalid Point: "(100,50,9949)". Points must have only 2 coordinates, 3 given.`
213
+ `Invalid Path: "${ testValue } " : Invalid Point: "(100,50,9949)". Points must have only 2 coordinates, 3 given.` ,
215
214
) ;
216
215
} ) ;
217
216
@@ -221,25 +220,25 @@ Deno.test("decodePoint", function () {
221
220
assertThrows (
222
221
( ) => decodePoint ( testValue ) ,
223
222
Error ,
224
- `Invalid Point: "${ testValue } ". Points must have only 2 coordinates, 1 given.`
223
+ `Invalid Point: "${ testValue } ". Points must have only 2 coordinates, 1 given.` ,
225
224
) ;
226
225
testValue = "(100.100,50,350)" ;
227
226
assertThrows (
228
227
( ) => decodePoint ( testValue ) ,
229
228
Error ,
230
- `Invalid Point: "${ testValue } ". Points must have only 2 coordinates, 3 given.`
229
+ `Invalid Point: "${ testValue } ". Points must have only 2 coordinates, 3 given.` ,
231
230
) ;
232
231
testValue = "(1,r344)" ;
233
232
assertThrows (
234
233
( ) => decodePoint ( testValue ) ,
235
234
Error ,
236
- `Invalid Point: "${ testValue } ". Coordinate "r344" must be a valid number.`
235
+ `Invalid Point: "${ testValue } ". Coordinate "r344" must be a valid number.` ,
237
236
) ;
238
237
testValue = "(cd 213ee,100)" ;
239
238
assertThrows (
240
239
( ) => decodePoint ( testValue ) ,
241
240
Error ,
242
- `Invalid Point: "${ testValue } ". Coordinate "cd 213ee" must be a valid number.`
241
+ `Invalid Point: "${ testValue } ". Coordinate "cd 213ee" must be a valid number.` ,
243
242
) ;
244
243
} ) ;
245
244
0 commit comments