forked from Ivasoft/mattermost-mobile
Upgrade deps (#5796)
This commit is contained in:
@@ -11,7 +11,7 @@ import {createPostsChain} from '@database/operator/utils/post';
|
||||
|
||||
import ServerDataOperator from '..';
|
||||
|
||||
Q.experimentalSortBy = jest.fn().mockImplementation((field) => {
|
||||
Q.sortBy = jest.fn().mockImplementation((field) => {
|
||||
return Q.where(field, Q.gte(0));
|
||||
});
|
||||
describe('*** Operator: Post Handlers tests ***', () => {
|
||||
|
||||
@@ -75,7 +75,7 @@ const PostsInChannelHandler = (superclass: any) => class extends superclass {
|
||||
// Find the records in the PostsInChannel table that have a matching channel_id
|
||||
const chunks = (await this.database.get(POSTS_IN_CHANNEL).query(
|
||||
Q.where('channel_id', channelId),
|
||||
Q.experimentalSortBy('latest', Q.desc),
|
||||
Q.sortBy('latest', Q.desc),
|
||||
).fetch()) as PostsInChannelModel[];
|
||||
|
||||
// chunk length 0; then it's a new chunk to be added to the PostsInChannel table
|
||||
@@ -130,7 +130,7 @@ const PostsInChannelHandler = (superclass: any) => class extends superclass {
|
||||
let recentChunk: PostsInChannelModel|undefined;
|
||||
const chunks = (await this.database.get(POSTS_IN_CHANNEL).query(
|
||||
Q.where('channel_id', firstPost.channel_id),
|
||||
Q.experimentalSortBy('latest', Q.desc),
|
||||
Q.sortBy('latest', Q.desc),
|
||||
).fetch()) as PostsInChannelModel[];
|
||||
|
||||
if (chunks.length) {
|
||||
@@ -193,7 +193,7 @@ const PostsInChannelHandler = (superclass: any) => class extends superclass {
|
||||
// Find the records in the PostsInChannel table that have a matching channel_id
|
||||
const chunks = (await this.database.get(POSTS_IN_CHANNEL).query(
|
||||
Q.where('channel_id', channelId),
|
||||
Q.experimentalSortBy('latest', Q.desc),
|
||||
Q.sortBy('latest', Q.desc),
|
||||
).fetch()) as PostsInChannelModel[];
|
||||
|
||||
// chunk length 0; then it's a new chunk to be added to the PostsInChannel table
|
||||
|
||||
@@ -30,7 +30,7 @@ const PostsInThreadHandler = (superclass: any) => class extends superclass {
|
||||
const {firstPost, lastPost} = getPostListEdges(postsMap[rootId]);
|
||||
const chunks = (await this.database.get(POSTS_IN_THREAD).query(
|
||||
Q.where('root_id', rootId),
|
||||
Q.experimentalSortBy('latest', Q.desc),
|
||||
Q.sortBy('latest', Q.desc),
|
||||
).fetch()) as PostsInThreadModel[];
|
||||
|
||||
if (chunks.length) {
|
||||
|
||||
Reference in New Issue
Block a user