Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): recover connections on a Wi-Fi/cellular handoff #12608

Closedkoushikxd(GitHub profile, opens in a new tab)wants to merge 11 commits intomain fromrefs/pull/12608/headopened View on GitHub

Showing 11 changed files with 182 additions and 0 deletions (loading 8).

x
0 of 11 viewed, 11 left
101 additions and 0 deletionsapps/mobile/src/connection/background-activity.test.tsModified
View file
@@ -1,7 +1,36 @@
import { EnvironmentId, WS_METHODS } from "@t3tools/contracts";
import { describe, expect, it } from "@effect/vitest";
+import * as Deferred from "effect/Deferred";
import * as Effect from "effect/Effect";
+import * as Layer from "effect/Layer";
+import * as Ref from "effect/Ref";
+import * as SubscriptionRef from "effect/SubscriptionRef";
+import { vi } from "vite-plus/test";
​
+vi.mock("react-native", () => ({
+ AppState: {
+ currentState: "active",
+ addEventListener: () => ({ remove: () => undefined }),
+ },
+}));
+​
+vi.mock("expo-secure-store", () => ({
+ deleteItemAsync: vi.fn(),
+ getItemAsync: vi.fn(),
+ setItemAsync: vi.fn(),
+}));
+​
+import {
+ AVAILABLE_CONNECTION_STATE,
+ type ConnectionCatalogEntry,
+ EnvironmentNotRegisteredError,
+ EnvironmentRegistry,
+ type NetworkStatus,
+ type SupervisorConnectionState,
+} from "@t3tools/client-runtime/connection";