fix: resolve formatting and lint errors in SafeAreaViewWithHookTopInset test#28708
fix: resolve formatting and lint errors in SafeAreaViewWithHookTopInset test#28708abretonc7s merged 2 commits intomainfrom
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
…et test Fix Prettier formatting violations and eslint errors introduced by #28622. These break lint checks on any PR that touches this file. - Reformat JSX to match Prettier config - Extract inline styles to StyleSheet.create (react-native/no-inline-styles) - Replace require() with jest.requireActual() in jest.mock factory
e01b2ef to
2ed31bc
Compare
Fixes TS2769 error from `ref: unknown` not assignable to `LegacyRef<View>`.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
No application source code was modified. No E2E test infrastructure, controllers, Engine, navigation, or shared UI components were touched. All test assertions remain identical — this is a pure code quality improvement to a unit test file. No E2E tests need to run for this change. Performance Test Selection: |
|



Description
Fix Prettier formatting violations and eslint errors in
SafeAreaViewWithHookTopInset.test.tsxintroduced by #28622. These break lint checks on any unrelated PR that touches this file.Changes:
StyleSheet.createto fixreact-native/no-inline-stylesrequire()withjest.requireActual()injest.mockfactory to fix@typescript-eslint/no-require-importsChangelog
CHANGELOG entry: null
Related issues
Fixes lint/formatting regressions from #28622
Manual testing steps
Screenshots/Recordings
N/A — no visual changes, formatting and lint fixes only.
Before
6 eslint errors on
main:@typescript-eslint/no-require-imports—require()insidejest.mockfactoryreact-native/no-inline-styles— inline style objects in test assertionsAfter
0 eslint errors, 0 eslint-disable comments, all 20 tests passing.
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk: changes are confined to a Jest test file and only adjust mocks/style declarations to satisfy linting/formatting, without touching runtime code paths.
Overview
Cleans up
SafeAreaViewWithHookTopInset.test.tsxto pass lint/format checks by switchingjest.mockfactories fromrequire()to typedjest.requireActual()and tightening ref typings in the mockSafeAreaView.Replaces inline style objects used in tests with a shared
StyleSheet.create(testStyles) and applies minor Prettier-driven JSX/line-wrap formatting changes, leaving test coverage/behavior unchanged.Reviewed by Cursor Bugbot for commit 00a20c7. Bugbot is set up for automated code reviews on this repo. Configure here.