Skip to content

Commit 01d054a

Browse files
Fix spec tests
1 parent ae50e1b commit 01d054a

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

packages/firestore/test/unit/generate_spec_json.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ NPM_BIN_DIR="$(npm bin)"
2424
TSNODE="$NPM_BIN_DIR/ts-node "
2525
GENERATE_SPEC_JS="$DIR/generate_spec_json.js"
2626

27-
export TS_NODE_CACHE=NO
28-
export TS_NODE_COMPILER_OPTIONS='{"module":"commonjs"}'
27+
export TS_NODE_CACHE=NO
28+
export TS_NODE_COMPILER_OPTIONS='{"module":"commonjs"}'
2929
export TS_NODE_PROJECT="$DIR/../../tsconfig.json"
3030

31-
$TSNODE --require ../../index.node.ts $GENERATE_SPEC_JS "$@"
31+
$TSNODE --require ../../src/index.node.ts $GENERATE_SPEC_JS "$@"

packages/firestore/test/unit/specs/existence_filter_spec.test.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -224,18 +224,20 @@ describeSpec('Existence Filters:', [], () => {
224224
const query1 = query('collection');
225225
const doc1 = doc('collection/1', 1000, { v: 1 });
226226
const doc2 = doc('collection/2', 1000, { v: 2 });
227-
return spec()
228-
.userListens(query1)
229-
.watchAcksFull(query1, 1000, doc1, doc2)
230-
.expectEvents(query1, { added: [doc1, doc2] })
231-
.watchFilters([query1], doc1.key) // doc2 was deleted
232-
.watchSnapshots(2000)
233-
.expectEvents(query1, { fromCache: true })
234-
// The SDK is unable to re-run the query, and does not remove doc2
235-
.restart()
236-
.userListens(query1)
237-
// We check that the data is still consistent with the local cache
238-
.expectEvents(query1, { added: [doc1, doc2], fromCache: true });
227+
return (
228+
spec()
229+
.userListens(query1)
230+
.watchAcksFull(query1, 1000, doc1, doc2)
231+
.expectEvents(query1, { added: [doc1, doc2] })
232+
.watchFilters([query1], doc1.key) // doc2 was deleted
233+
.watchSnapshots(2000)
234+
.expectEvents(query1, { fromCache: true })
235+
// The SDK is unable to re-run the query, and does not remove doc2
236+
.restart()
237+
.userListens(query1)
238+
// We check that the data is still consistent with the local cache
239+
.expectEvents(query1, { added: [doc1, doc2], fromCache: true })
240+
);
239241
}
240242
);
241243
});

0 commit comments

Comments
 (0)