Skip to content

Commit 9001203

Browse files
committed
chore: update yarn lock file
1 parent a3583a0 commit 9001203

File tree

5 files changed

+202
-19
lines changed

5 files changed

+202
-19
lines changed

package/jest-setup.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import { FlatList, View } from 'react-native';
33

44
import mockRNCNetInfo from '@react-native-community/netinfo/jest/netinfo-mock.js';
55

6-
import { registerNativeHandlers } from './src/native';
76
import { configure } from 'reassure';
87

8+
import { registerNativeHandlers } from './src/native';
9+
910
// For performance tests using reassure
1011
configure({ testingLibrary: 'react-native' });
1112

package/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@
128128
"better-sqlite3": "11.8.1",
129129
"eslint": "^9.20.1",
130130
"eslint-config-prettier": "10.0.1",
131+
"eslint-plugin-eslint-comments": "^3.2.0",
131132
"eslint-plugin-import": "^2.31.0",
132133
"eslint-plugin-jest": "^28.11.0",
133134
"eslint-plugin-markdown": "5.1.0",
134135
"eslint-plugin-prettier": "5.2.3",
135136
"eslint-plugin-react": "^7.37.4",
136-
"eslint-plugin-eslint-comments": "^3.2.0",
137137
"eslint-plugin-react-hooks": "^5.1.0",
138138
"eslint-plugin-react-native": "^5.0.0",
139139
"i18next-parser": "^9.0.0",
@@ -147,6 +147,7 @@
147147
"react-native-reanimated": "~3.10.0",
148148
"react-native-svg": "15.1.0",
149149
"react-test-renderer": "18.2.0",
150+
"reassure": "^1.3.3",
150151
"typescript": "5.0.4",
151152
"typescript-eslint": "^8.24.1",
152153
"uuid": "^8.3.2"

package/src/components/ChannelList/__tests__/ChannelList.perf-test.tsx

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { generateUser } from '../../../mock-builders/generator/user';
1010
import { getTestClientWithUser } from '../../../mock-builders/mock';
1111
import { Chat } from '../../Chat/Chat';
1212
import { ChannelList } from '../ChannelList';
13+
import { Streami18n } from '../../../utils/i18n/Streami18n';
1314

1415
describe('ChannelList', () => {
1516
let chatClient;
@@ -31,13 +32,35 @@ describe('ChannelList', () => {
3132
test('ChannelList 10 times', async () => {
3233
useMockedApis(chatClient, [queryChannelsApi([testChannel1, testChannel2])]);
3334

34-
const scenario = async () => {};
3535
const props = {
36-
filters: {},
36+
filters: {
37+
members: { $in: [member.user.id] },
38+
type: 'messaging',
39+
},
40+
options: {
41+
limit: 30,
42+
presence: true,
43+
state: true,
44+
watch: true,
45+
},
46+
sort: [{ pinned_at: -1 }, { last_message_at: -1 }, { updated_at: -1 }],
3747
};
3848

39-
await measureRenders(<ChannelList filters={props.filters} />, {
40-
wrapper: ({ children }) => <Chat client={chatClient}>{children}</Chat>,
49+
const streami18n = new Streami18n({
50+
language: 'en',
4151
});
52+
53+
await measureRenders(
54+
<ChannelList filters={props.filters} options={props.options} sort={props.sort} />,
55+
{
56+
runs: 1,
57+
warmupRuns: 0,
58+
wrapper: ({ children }) => (
59+
<Chat client={chatClient} i18nInstance={streami18n}>
60+
{children}
61+
</Chat>
62+
),
63+
},
64+
);
4265
});
4366
});

package/src/mock-builders/generator/channel.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
2-
import { Channel, ChannelResponse } from 'stream-chat';
32
import { v4 as uuidv4 } from 'uuid';
43

54
import { generateUser, getUserDefaults } from './user';
@@ -100,8 +99,8 @@ export const generateChannel1 = (options: { channel: any; config: any; members:
10099
const id = idFromOptions
101100
? idFromOptions
102101
: options.members && options.members.length
103-
? `!members-${uuidv4()}`
104-
: uuidv4();
102+
? `!members-${uuidv4()}`
103+
: uuidv4();
105104
return {
106105
...optionsBesidesChannel,
107106
messages: [],

0 commit comments

Comments
 (0)