Skip to content

Commit 4aaad54

Browse files
test(mobile): mock environment scopes in the Git actions hook test
Main's source-control write permissions made the hook read session scopes, which pulls Expo into the test environment. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 92751e1 commit 4aaad54

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎apps/mobile/src/state/use-selected-thread-git-actions.test.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ vi.mock("./threads", () => ({ threadEnvironment: { updateMetadata: "updateMetada
3535
vi.mock("./queries", () => ({ useBranches: () => ({ data: null, refresh: () => {} }) }));
3636
vi.mock("../lib/uuid", () => ({ uuidv4: () => "uuid" }));
3737
vi.mock("./atom-registry", () => ({ appAtomRegistry: {} }));
38+
vi.mock("./session", () => ({
39+
readEnvironmentScope: () => true,
40+
useEnvironmentScope: () => true,
41+
}));
3842
vi.mock("./use-remote-environment-registry", () => ({ setPendingConnectionError: () => {} }));
3943
vi.mock("./use-vcs-action-state", () => ({ showGitActionResult: () => {} }));
4044
// Runs on every render: a refresh loop fails fast here instead of exhausting memory.

0 commit comments

Comments
 (0)