From 67e976f7cc98a89a0acc673378e0e3c4745f07ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Wed, 10 Jun 2026 03:29:07 +0200 Subject: [PATCH] mobile: await render() in smoke test for RNTL v14 compatibility RNTL v14 makes render() async; awaiting it is a no-op on v13, so this works on both and unblocks the dependabot v14 bump (#508). Co-Authored-By: Claude Fable 5 --- apps/mobile/app/__tests__/smoke.test.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/mobile/app/__tests__/smoke.test.tsx b/apps/mobile/app/__tests__/smoke.test.tsx index 907e02a..f7922d9 100644 --- a/apps/mobile/app/__tests__/smoke.test.tsx +++ b/apps/mobile/app/__tests__/smoke.test.tsx @@ -3,8 +3,10 @@ import { render, screen } from "@testing-library/react-native"; import { Text } from "react-native"; describe("Jest + React Native Testing Library", () => { - it("renders a component", () => { - render(Hello); + it("renders a component", async () => { + // await is a no-op on RNTL v13 but required on v14, where render() + // returns a Promise + await render(Hello); expect(screen.getByTestId("hello")).toBeTruthy(); expect(screen.getByText("Hello")).toBeTruthy(); });