diff --git a/src/components/Componentes/question-phone.test.tsx b/src/components/Componentes/question-phone.test.tsx index 5900f81..895d93d 100644 --- a/src/components/Componentes/question-phone.test.tsx +++ b/src/components/Componentes/question-phone.test.tsx @@ -103,7 +103,7 @@ describe("QuestionPhone IP country detection and shimmer", () => { expect(input.classList.contains("shimmer-bg")).toBe(false); await act(async () => { - flutterListeners.forEach((l) => + flutterListeners.forEach((l) => { l({ action: "get_location", success: true, @@ -111,8 +111,8 @@ describe("QuestionPhone IP country detection and shimmer", () => { country: "Iran", country_code: "IR", }, - }), - ); + }); + }); }); await waitFor(() => { @@ -128,12 +128,12 @@ describe("QuestionPhone IP country detection and shimmer", () => { const { container } = render(); await act(async () => { - flutterListeners.forEach((l) => + flutterListeners.forEach((l) => { l({ action: "get_location", success: false, - }), - ); + }); + }); }); await waitFor(() => { @@ -173,7 +173,7 @@ describe("QuestionPhone IP country detection and shimmer", () => { ); await act(async () => { - flutterListeners.forEach((l) => + flutterListeners.forEach((l) => { l({ action: "get_location", success: true, @@ -181,8 +181,8 @@ describe("QuestionPhone IP country detection and shimmer", () => { country: "Iran", country_code: "IR", }, - }), - ); + }); + }); }); await waitFor(() => { @@ -213,7 +213,7 @@ describe("QuestionPhone IP country detection and shimmer", () => { fireEvent.change(input, { target: { value: "7400123456" } }); await act(async () => { - flutterListeners.forEach((l) => + flutterListeners.forEach((l) => { l({ action: "get_location", success: true, @@ -221,8 +221,8 @@ describe("QuestionPhone IP country detection and shimmer", () => { country: "Iran", country_code: "IR", }, - }), - ); + }); + }); }); expect(screen.getByDisplayValue("7400 123456")).toBeDefined(); @@ -255,7 +255,7 @@ describe("QuestionPhone IP country detection and shimmer", () => { expect(input.placeholder).toBe("7400 123456"); await act(async () => { - flutterListeners.forEach((l) => + flutterListeners.forEach((l) => { l({ action: "get_location", success: true, @@ -263,8 +263,8 @@ describe("QuestionPhone IP country detection and shimmer", () => { country: "Iran", country_code: "IR", }, - }), - ); + }); + }); }); await waitFor(() => { diff --git a/src/lib/geo-region.ts b/src/lib/geo-region.ts index 3b8ee5c..7f3c110 100644 --- a/src/lib/geo-region.ts +++ b/src/lib/geo-region.ts @@ -65,7 +65,9 @@ export function setStoredUserGeoRegion(region: UserGeoRegion) { } } catch {} } - listeners.forEach((fn) => fn(region)); + listeners.forEach((fn) => { + fn(region); + }); } function resolvePhoneCodeFromCountryCode(isoCode?: string): string | undefined {