Skip to content

Commit 2b530ea

Browse files
committed
fix: fix unit test
1 parent e83be04 commit 2b530ea

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [1.26.1](https://github.com/Pjaijai/Referalah/compare/v1.26.0...v1.26.1) (2025-05-19)
6+
57
## [1.26.0](https://github.com/Pjaijai/Referalah/compare/v1.21.1...v1.26.0) (2025-05-19)
68

79

client/modules/chat/components/lists/message/message.test.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@ import useGetMessageListByConversationUuid from "@/hooks/api/message/get-message
1313
import useUserStore from "@/hooks/state/user/store"
1414

1515
// Mock the hooks and components
16+
jest.mock("firebase/remote-config", () => ({
17+
getRemoteConfig: jest.fn(() => ({
18+
settings: {
19+
minimumFetchIntervalMillis: 3600000,
20+
},
21+
})),
22+
fetchAndActivate: jest.fn(() => Promise.resolve(true)),
23+
getValue: jest.fn(() => ({
24+
asBoolean: jest.fn(() => false),
25+
asString: jest.fn(() => ""),
26+
asNumber: jest.fn(() => 0),
27+
})),
28+
}))
29+
1630
jest.mock("@/hooks/api/message/get-message-list-by-conversation-uuid")
1731
jest.mock("@/hooks/state/user/store")
1832
jest.mock("@/utils/services/supabase/config", () => ({
@@ -21,6 +35,7 @@ jest.mock("@/utils/services/supabase/config", () => ({
2135
on: jest.fn().mockReturnThis(),
2236
subscribe: jest.fn(),
2337
})),
38+
getRemoteConfig: jest.fn(),
2439
removeChannel: jest.fn(),
2540
},
2641
}))

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Referalah",
33
"description": "An open source online platform for oversea Hong Kong People to connect each other",
4-
"version": "1.26.0",
4+
"version": "1.26.1",
55
"license": "Apache-2.0",
66
"scripts": {
77
"prepare": "husky install .husky",

0 commit comments

Comments
 (0)