No Backbone in data layer; server/client interfaces are now similar

This commit is contained in:
Scott Nonnenberg 2021-12-10 14:51:54 -08:00 committed by GitHub
parent 064bbfe97a
commit 34fd945f83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 573 additions and 1021 deletions

View file

@ -23,12 +23,7 @@ describe('sql/stories', () => {
describe('getOlderStories', () => {
it('returns N most recent stories overall, or in converation, or by author', async () => {
assert.lengthOf(
await _getAllMessages({
MessageCollection: window.Whisper.MessageCollection,
}),
0
);
assert.lengthOf(await _getAllMessages(), 0);
const now = Date.now();
const conversationId = getUuid();
@ -89,12 +84,7 @@ describe('sql/stories', () => {
forceSave: true,
});
assert.lengthOf(
await _getAllMessages({
MessageCollection: window.Whisper.MessageCollection,
}),
5
);
assert.lengthOf(await _getAllMessages(), 5);
const stories = await getOlderStories({
limit: 5,
@ -155,12 +145,7 @@ describe('sql/stories', () => {
});
it('returns N stories older than provided receivedAt/sentAt', async () => {
assert.lengthOf(
await _getAllMessages({
MessageCollection: window.Whisper.MessageCollection,
}),
0
);
assert.lengthOf(await _getAllMessages(), 0);
const start = Date.now();
const conversationId = getUuid();
@ -214,12 +199,7 @@ describe('sql/stories', () => {
forceSave: true,
});
assert.lengthOf(
await _getAllMessages({
MessageCollection: window.Whisper.MessageCollection,
}),
5
);
assert.lengthOf(await _getAllMessages(), 5);
const stories = await getOlderStories({
receivedAt: story4.received_at,