Skip to content

Commit 5fad702

Browse files
committed
Switch serializer tests to test round trips
Rather than separate tests for encoding/decoding. Similar to the other platforms.
1 parent 1aacd1c commit 5fad702

File tree

3 files changed

+264
-280
lines changed

3 files changed

+264
-280
lines changed

packages/firestore/src/protos/firestore_proto_api.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,9 @@ export declare namespace firestoreV1ApiClientInterfaces {
353353
booleanValue?: boolean;
354354
integerValue?: string;
355355
doubleValue?: number;
356-
timestampValue?: string;
356+
timestampValue?: string | { seconds: long; nanos: long };
357357
stringValue?: string;
358-
bytesValue?: string;
358+
bytesValue?: string | Uint8Array;
359359
referenceValue?: string;
360360
geoPointValue?: LatLng;
361361
arrayValue?: ArrayValue;

packages/firestore/src/remote/serializer.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,6 @@ export class JsonProtoSerializer {
284284
);
285285
return Blob.fromBase64String(blob);
286286
} else {
287-
assert(
288-
!this.options.useProto3Json,
289-
'Expected bytes to be passed in as string, but got something else instead.'
290-
);
291287
return Blob.fromUint8Array(blob);
292288
}
293289
}

0 commit comments

Comments
 (0)