@@ -60,15 +60,13 @@ describe("FluidSerializer", () => {
60
60
// Verify that `encode` is a no-op for these simple cases.
61
61
for ( const input of simple ) {
62
62
it ( `${ printHandle ( input ) } -> ${ JSON . stringify ( input ) } ` , ( ) => {
63
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- test deals with several object shapes
64
63
const actual = serializer . encode ( input , handle ) ;
65
64
assert . strictEqual (
66
65
actual ,
67
66
input ,
68
67
"encode() on input with no handles must return original input." ,
69
68
) ;
70
69
71
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- test deals with several object shapes
72
70
const decoded = serializer . decode ( actual ) ;
73
71
assert . strictEqual (
74
72
decoded ,
@@ -120,15 +118,13 @@ describe("FluidSerializer", () => {
120
118
121
119
for ( const input of tricky ) {
122
120
it ( `${ printHandle ( input ) } -> ${ JSON . stringify ( input ) } ` , ( ) => {
123
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- test deals with several object shapes
124
121
const actual = serializer . encode ( input , handle ) ;
125
122
assert . strictEqual (
126
123
actual ,
127
124
input ,
128
125
"encode() on input with no handles must return original input." ,
129
126
) ;
130
127
131
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- test deals with several object shapes
132
128
const decoded = serializer . decode ( actual ) ;
133
129
assert . strictEqual (
134
130
decoded ,
@@ -177,7 +173,6 @@ describe("FluidSerializer", () => {
177
173
178
174
function check ( decodedForm , encodedForm ) : void {
179
175
it ( `${ printHandle ( decodedForm ) } -> ${ JSON . stringify ( encodedForm ) } ` , ( ) => {
180
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- TODO: update when we can fix the return type of serializer.encode()
181
176
const replaced = serializer . encode ( decodedForm , handle ) ;
182
177
assert . notStrictEqual (
183
178
replaced ,
@@ -186,11 +181,9 @@ describe("FluidSerializer", () => {
186
181
) ;
187
182
assert . deepStrictEqual ( replaced , encodedForm , "encode() must return expected output." ) ;
188
183
189
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- TODO: update when we can fix the return type of serializer.encode()
190
184
const replacedTwice = serializer . encode ( replaced , handle ) ;
191
185
assert . deepStrictEqual ( replacedTwice , replaced , "encode should be idempotent" ) ;
192
186
193
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- TODO: update when we can fix the return type of serializer.decode()
194
187
const decodedRoundTrip = serializer . decode ( replaced ) ;
195
188
assert . notStrictEqual (
196
189
decodedRoundTrip ,
@@ -203,7 +196,6 @@ describe("FluidSerializer", () => {
203
196
"input must round-trip through encode()/decode()." ,
204
197
) ;
205
198
206
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- TODO: update when we can fix the return type of serializer.decode()
207
199
const decodedTwice = serializer . decode ( decodedRoundTrip ) ;
208
200
assert . deepStrictEqual ( decodedTwice , decodedRoundTrip , "decode should be idempotent" ) ;
209
201
@@ -251,15 +243,13 @@ describe("FluidSerializer", () => {
251
243
input . h = handle ; // eslint-disable-line @typescript-eslint/no-unsafe-member-access
252
244
input . o1 . h = handle ; // eslint-disable-line @typescript-eslint/no-unsafe-member-access
253
245
254
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- TODO: update when we can fix the return type of serializer.encode()
255
246
const replaced = serializer . encode ( input , handle ) ;
256
247
assert . notStrictEqual (
257
248
replaced ,
258
249
input ,
259
250
"encode() must shallow-clone rather than mutate original object." ,
260
251
) ;
261
252
262
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- TODO: update when we can fix the return type of serializer.decode()
263
253
const decoded = serializer . decode ( replaced ) ;
264
254
assert . notStrictEqual (
265
255
decoded ,
0 commit comments