Skip to content

Commit 146de2a

Browse files
committed
chore: tests
1 parent 5686448 commit 146de2a

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/components/__tests__/TextField.test.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ import type { TextFieldAccessoryProps } from '../TextField/TextField';
88

99
const defaultI18nIsRTL = I18nManager.isRTL;
1010

11+
const getConstantsOriginal = I18nManager.getConstants.bind(I18nManager);
12+
13+
beforeAll(() => {
14+
jest.spyOn(I18nManager, 'getConstants').mockImplementation(() => ({
15+
...getConstantsOriginal(),
16+
isRTL: I18nManager.isRTL,
17+
}));
18+
});
19+
20+
afterAll(() => {
21+
jest.restoreAllMocks();
22+
});
23+
1124
afterEach(() => {
1225
I18nManager.isRTL = defaultI18nIsRTL;
1326
});

0 commit comments

Comments
 (0)