Skip to content

Commit 3310855

Browse files
committed
Add test case with
1 parent bb3c4ed commit 3310855

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

packages/database/test/helpers/syncPointSpec.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4271,6 +4271,58 @@
42714271
}
42724272
]
42734273
},
4274+
{
4275+
"name": "Queries with startAfter, endBefore, and orderByChild work",
4276+
"steps":
4277+
[
4278+
{
4279+
"type": "listen",
4280+
"path": "",
4281+
"params": {
4282+
"tag": 1,
4283+
"orderBy": "foo/index",
4284+
"startAfter": { "index": 1, "name": "foo" },
4285+
"endBefore": { "index": 10, "name": "foo" }
4286+
},
4287+
"events": []
4288+
},
4289+
{
4290+
".comment": "update from server sends all data",
4291+
"type": "serverUpdate",
4292+
"path": "",
4293+
"data": {
4294+
"a": { "foo": { "index": 0, "value": "a" } },
4295+
"b": { "foo": { "index": 2, "value": "b" } },
4296+
"c": { "foo": { "index": 9, "value": "c" } },
4297+
"d": { "foo": { "index": 11, "value": "d" } }
4298+
},
4299+
"events": [
4300+
{
4301+
"path": "",
4302+
"type": "child_added",
4303+
"name": "b",
4304+
"prevName": null,
4305+
"data": { "foo": { "index": 2, "value": "b" } }
4306+
},
4307+
{
4308+
"path": "",
4309+
"type": "child_added",
4310+
"name": "c",
4311+
"prevName": "b",
4312+
"data": { "foo": { "index": 9, "value": "c" } }
4313+
},
4314+
{
4315+
"path": "",
4316+
"type": "value",
4317+
"data": {
4318+
"b": { "foo": { "index": 2, "value": "b" } },
4319+
"c": { "foo": { "index": 9, "value": "c" } }
4320+
}
4321+
}
4322+
]
4323+
}
4324+
]
4325+
},
42744326
{
42754327
"name": "Queries indexed by key with startAfter, endBefore, and limitToFirst work",
42764328
"steps":

0 commit comments

Comments
 (0)