Commit 2d2555f
committed
improvement(codebase): migrate tests to dbChainMock, extract react-query hooks
Migrate 97 test files to centralized dbChainMock/dbChainMockFns helpers from
@sim/testing — removes hoisted chain-wiring boilerplate.
Extend dbChainMock to cover insert/update/delete/transaction/execute patterns.
Extract useGitHubStars and useVoiceSettings react-query hooks from inline fetches.
Centralize additional mocks (authMockFns, hybridAuthMockFns) and update docs.1 parent 1ced54a commit 2d2555f
File tree
99 files changed
+958
-1451
lines changed- .claude/rules
- .cursor/rules
- apps/sim
- app
- (landing)
- actions
- api
- auth/oauth
- connections
- credentials
- disconnect
- token
- chat
- [identifier]
- otp
- manage/[id]
- copilot
- api-keys
- chats
- chat
- delete
- stop
- update-messages
- checkpoints
- revert
- feedback
- files
- delete
- parse
- presigned
- serve/[...path]
- upload
- folders
- [id]
- function/execute
- jobs/[jobId]
- knowledge
- [id]
- connectors/[connectorId]
- documents
- sync
- documents
- [documentId]
- search
- mcp
- events
- serve/[serverId]
- schedules
- [id]
- execute
- table/[tableId]/import-csv
- tools
- crowdstrike/query
- custom
- webhooks/trigger/[path]
- workflows
- [id]
- chat/status
- execute
- executions/[executionId]/cancel
- form/status
- variables
- workspaces
- [id]
- docx/preview
- pdf/preview
- pptx/preview
- invitations
- [invitationId]
- chat
- [identifier]
- components/auth
- email
- password
- background
- ee/access-control/utils
- executor/handlers
- agent
- condition
- hooks/queries
- lib
- audit
- billing
- credits
- webhooks
- copilot
- async-runs
- chat
- request/handlers
- validation
- execution
- knowledge/connectors
- logs/execution
- snapshot
- messaging/email
- table/__tests__
- webhooks
- providers
- workflows
- persistence
- workspaces
- permissions
- socket/middleware
- packages/testing/src/mocks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
99 files changed
+958
-1451
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
192 | 196 | | |
193 | 197 | | |
194 | 198 | | |
| 199 | + | |
| 200 | + | |
195 | 201 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 202 | + | |
201 | 203 | | |
202 | | - | |
203 | | - | |
204 | | - | |
| 204 | + | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | | - | |
208 | | - | |
209 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
210 | 216 | | |
211 | 217 | | |
212 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
213 | 231 | | |
214 | 232 | | |
215 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
This file was deleted.
Lines changed: 6 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | | - | |
| 4 | + | |
7 | 5 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 6 | + | |
11 | 7 | | |
12 | 8 | | |
13 | 9 | | |
| |||
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 15 | + | |
| 16 | + | |
28 | 17 | | |
29 | 18 | | |
30 | 19 | | |
31 | 20 | | |
32 | 21 | | |
33 | 22 | | |
34 | 23 | | |
35 | | - | |
| 24 | + | |
36 | 25 | | |
37 | 26 | | |
38 | | - | |
| 27 | + | |
39 | 28 | | |
40 | 29 | | |
41 | 30 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
35 | 20 | | |
36 | 21 | | |
37 | | - | |
| 22 | + | |
38 | 23 | | |
39 | 24 | | |
40 | 25 | | |
| |||
48 | 33 | | |
49 | 34 | | |
50 | 35 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 36 | | |
56 | 37 | | |
57 | 38 | | |
| |||
61 | 42 | | |
62 | 43 | | |
63 | 44 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 45 | + | |
68 | 46 | | |
69 | 47 | | |
70 | 48 | | |
| |||
98 | 76 | | |
99 | 77 | | |
100 | 78 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 79 | + | |
| 80 | + | |
109 | 81 | | |
110 | 82 | | |
111 | 83 | | |
| |||
138 | 110 | | |
139 | 111 | | |
140 | 112 | | |
141 | | - | |
142 | 113 | | |
143 | 114 | | |
144 | 115 | | |
145 | 116 | | |
146 | 117 | | |
147 | 118 | | |
148 | 119 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 120 | + | |
| 121 | + | |
157 | 122 | | |
158 | 123 | | |
159 | 124 | | |
| |||
169 | 134 | | |
170 | 135 | | |
171 | 136 | | |
172 | | - | |
173 | | - | |
174 | | - | |
| 137 | + | |
175 | 138 | | |
176 | 139 | | |
177 | 140 | | |
| |||
180 | 143 | | |
181 | 144 | | |
182 | 145 | | |
183 | | - | |
184 | 146 | | |
185 | 147 | | |
186 | 148 | | |
| |||
204 | 166 | | |
205 | 167 | | |
206 | 168 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 169 | + | |
| 170 | + | |
215 | 171 | | |
216 | 172 | | |
217 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 7 | + | |
15 | 8 | | |
16 | 9 | | |
17 | 10 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 11 | | |
38 | 12 | | |
39 | 13 | | |
| |||
42 | 16 | | |
43 | 17 | | |
44 | 18 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 19 | | |
52 | 20 | | |
53 | 21 | | |
| |||
73 | 41 | | |
74 | 42 | | |
75 | 43 | | |
76 | | - | |
77 | 44 | | |
78 | 45 | | |
79 | 46 | | |
| |||
90 | 57 | | |
91 | 58 | | |
92 | 59 | | |
93 | | - | |
94 | 60 | | |
95 | 61 | | |
96 | 62 | | |
| |||
0 commit comments