Skip to content

Commit 4ec5344

Browse files
Disable negative zero test on IndexedDB (#5299)
1 parent 36c0ddc commit 4ec5344

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.changeset/blue-suits-wait.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/firestore/test/integration/api/type.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ apiDescribe('Firestore', (persistence: boolean) => {
8181

8282
it('can read and write number fields', () => {
8383
return withTestDb(persistence, async db => {
84-
// TODO(b/174486484): If we build ViewSnapshots from IndexedDb, this test
85-
// fails since we first store the backend proto in IndexedDb, which turns
86-
// -0.0 into 0.0.
84+
// TODO(b/174486484): This test should always test -0.0, but right now
85+
// this leaks to flakes as we turn -0.0 into 0.0 when we build the
86+
// snapshot from IndexedDb
8787
const validateSnapshots = !persistence;
8888
await expectRoundtrip(
8989
db,
90-
{ a: 1, b: NaN, c: Infinity, d: -0.0 },
90+
{ a: 1, b: NaN, c: Infinity, d: persistence ? 0.0 : -0.0 },
9191
validateSnapshots
9292
);
9393
});

0 commit comments

Comments
 (0)