Skip to content

Commit 5e7a3d1

Browse files
committed
make generateBloomFilterProto return base64 string
1 parent af17b59 commit 5e7a3d1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/firestore/test/util/helpers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ import {
8585
SetMutation,
8686
FieldTransform
8787
} from '../../src/model/mutation';
88+
import { normalizeByteString } from '../../src/model/normalize';
8889
import { JsonObject, ObjectValue } from '../../src/model/object_value';
8990
import { FieldPath, ResourcePath } from '../../src/model/path';
9091
import { decodeBase64, encodeBase64 } from '../../src/platform/base64';
@@ -1108,7 +1109,10 @@ export function generateBloomFilterProto(config: {
11081109
}
11091110
});
11101111
return {
1111-
bits: { bitmap: bloomFilter.bitmap, padding: bloomFilter.padding },
1112+
bits: {
1113+
bitmap: normalizeByteString(bloomFilter.bitmap).toBase64(),
1114+
padding: bloomFilter.padding
1115+
},
11121116
hashCount: bloomFilter.hashCount
11131117
};
11141118
}

0 commit comments

Comments
 (0)