Skip to content

Commit 54d8863

Browse files
committed
chore: update file style with denot fmt
1 parent 91f8b64 commit 54d8863

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

tests/decode_test.ts

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ Deno.test("decodeBigint", function () {
2525
Deno.test("decodeBigintArray", function () {
2626
assertEquals(
2727
decodeBigintArray(
28-
"{17365398509481972,9007199254740992,-10414398509481984}"
28+
"{17365398509481972,9007199254740992,-10414398509481984}",
2929
),
30-
[17365398509481972n, 9007199254740992n, -10414398509481984n]
30+
[17365398509481972n, 9007199254740992n, -10414398509481984n],
3131
);
3232
});
3333

@@ -62,25 +62,25 @@ Deno.test("decodeBox", function () {
6262
assertThrows(
6363
() => decodeBox(testValue),
6464
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.`,
6666
);
6767
testValue = "(12.4,2),(123,123,123),(9303,33)";
6868
assertThrows(
6969
() => decodeBox(testValue),
7070
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.`,
7272
);
7373
testValue = "(0,0),(123,123,123)";
7474
assertThrows(
7575
() => decodeBox(testValue),
7676
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.`,
7878
);
7979
testValue = "(0,0),(100,r100)";
8080
assertThrows(
8181
() => decodeBox(testValue),
8282
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.`,
8484
);
8585
});
8686

@@ -93,13 +93,13 @@ Deno.test("decodeCircle", function () {
9393
assertThrows(
9494
() => decodeCircle(testValue),
9595
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.`,
9797
);
9898
testValue = "<(33,2),mn23 3.5>";
9999
assertThrows(
100100
() => decodeCircle(testValue),
101101
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.`,
103103
);
104104
});
105105

@@ -110,11 +110,11 @@ Deno.test("decodeDate", function () {
110110
Deno.test("decodeDatetime", function () {
111111
assertEquals(
112112
decodeDatetime("2021-08-01"),
113-
new Date("2021-08-01 00:00:00-00")
113+
new Date("2021-08-01 00:00:00-00"),
114114
);
115115
assertEquals(
116116
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"),
118118
);
119119
});
120120

@@ -131,14 +131,14 @@ Deno.test("decodeInt", function () {
131131
Deno.test("decodeJson", function () {
132132
assertEquals(
133133
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]}}',
135135
),
136136
{
137137
key_1: "MY VALUE",
138138
key_2: null,
139139
key_3: 10,
140140
key_4: { subkey_1: true, subkey_2: ["1", 2] },
141-
}
141+
},
142142
);
143143
assertThrows(() => decodeJson("{ 'eqw' ; ddd}"));
144144
});
@@ -149,13 +149,13 @@ Deno.test("decodeLine", function () {
149149
assertThrows(
150150
() => decodeLine("{100,50,0,100}"),
151151
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.`,
153153
);
154154
testValue = "{100,d3km,0}";
155155
assertThrows(
156156
() => decodeLine(testValue),
157157
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.`,
159159
);
160160
});
161161

@@ -168,26 +168,25 @@ Deno.test("decodeLineSegment", function () {
168168
assertThrows(
169169
() => decodeLineSegment(testValue),
170170
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.`,
173172
);
174173
testValue = "((100),(r344,350))";
175174
assertThrows(
176175
() => decodeLineSegment(testValue),
177176
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.`,
179178
);
180179
testValue = "((100,50))";
181180
assertThrows(
182181
() => decodeLineSegment(testValue),
183182
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.`,
185184
);
186185
testValue = "((100,50),(350,350),(100,100))";
187186
assertThrows(
188187
() => decodeLineSegment(testValue),
189188
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.`,
191190
);
192191
});
193192

@@ -205,13 +204,13 @@ Deno.test("decodePath", function () {
205204
assertThrows(
206205
() => decodePath(testValue),
207206
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.`,
209208
);
210209
testValue = "((100,50,9949))";
211210
assertThrows(
212211
() => decodePath(testValue),
213212
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.`,
215214
);
216215
});
217216

@@ -221,25 +220,25 @@ Deno.test("decodePoint", function () {
221220
assertThrows(
222221
() => decodePoint(testValue),
223222
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.`,
225224
);
226225
testValue = "(100.100,50,350)";
227226
assertThrows(
228227
() => decodePoint(testValue),
229228
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.`,
231230
);
232231
testValue = "(1,r344)";
233232
assertThrows(
234233
() => decodePoint(testValue),
235234
Error,
236-
`Invalid Point: "${testValue}". Coordinate "r344" must be a valid number.`
235+
`Invalid Point: "${testValue}". Coordinate "r344" must be a valid number.`,
237236
);
238237
testValue = "(cd 213ee,100)";
239238
assertThrows(
240239
() => decodePoint(testValue),
241240
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.`,
243242
);
244243
});
245244

0 commit comments

Comments
 (0)