Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bf20b73

Browse files
committedNov 5, 2024
chore: update to RN 0.77 nightly
chore: fix host-component-names chore: update deps chore: fix lint
1 parent a7404dc commit bf20b73

File tree

4 files changed

+695
-285
lines changed

4 files changed

+695
-285
lines changed
 

‎package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"@babel/preset-react": "^7.25.9",
7373
"@babel/preset-typescript": "^7.26.0",
7474
"@callstack/eslint-config": "^15.0.0",
75-
"@react-native/babel-preset": "^0.76.1",
75+
"@react-native/babel-preset": "0.77.0-nightly-20241105-fe656be26",
7676
"@release-it/conventional-changelog": "^9.0.2",
7777
"@relmify/jest-serializer-strip-ansi": "^1.0.2",
7878
"@types/jest": "^29.5.14",
@@ -86,9 +86,9 @@
8686
"flow-bin": "~0.170.0",
8787
"jest": "^29.7.0",
8888
"prettier": "^2.8.8",
89-
"react": "18.3.1",
90-
"react-native": "0.76.1",
91-
"react-test-renderer": "18.3.1",
89+
"react": "19.0.0-rc-fb9a90fa48-20240614",
90+
"react-native": "0.77.0-nightly-20241105-fe656be26",
91+
"react-test-renderer": "19.0.0-rc-fb9a90fa48-20240614",
9292
"release-it": "^17.10.0",
9393
"strip-ansi": "^6.0.1",
9494
"typescript": "^5.6.3"

‎src/__tests__/host-component-names.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Image, Modal, ScrollView, Switch, Text, TextInput } from 'react-native';
3+
import { render, screen } from '..';
34
import {
45
isHostImage,
56
isHostModal,
@@ -8,7 +9,6 @@ import {
89
isHostText,
910
isHostTextInput,
1011
} from '../helpers/host-component-names';
11-
import { render, screen } from '..';
1212

1313
test('detects host Text component', () => {
1414
render(<Text>Hello</Text>);

‎src/__tests__/react-native-animated.tsx renamed to ‎src/__tests__/react-native-animated.test.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ describe('AnimatedView', () => {
4141
jest.useRealTimers();
4242
});
4343

44-
it('should use native driver when useNativeDriver is true', async () => {
44+
it('works when useNativeDriver is false', async () => {
4545
render(
46-
<AnimatedView fadeInDuration={250} useNativeDriver={true}>
46+
<AnimatedView fadeInDuration={250} useNativeDriver={false}>
4747
Test
4848
</AnimatedView>,
4949
);
@@ -53,15 +53,16 @@ describe('AnimatedView', () => {
5353
expect(screen.root).toHaveStyle({ opacity: 1 });
5454
});
5555

56-
it('should not use native driver when useNativeDriver is false', async () => {
56+
it('does not crash when useNativeDriver is true', async () => {
5757
render(
58-
<AnimatedView fadeInDuration={250} useNativeDriver={false}>
58+
<AnimatedView fadeInDuration={250} useNativeDriver={true}>
5959
Test
6060
</AnimatedView>,
6161
);
6262
expect(screen.root).toHaveStyle({ opacity: 0 });
6363

6464
await act(() => jest.advanceTimersByTime(250));
65-
expect(screen.root).toHaveStyle({ opacity: 1 });
65+
// Native driver does not work in Jest tests
66+
// expect(screen.root).toHaveStyle({ opacity: 1 });
6667
});
6768
});

‎yarn.lock

Lines changed: 684 additions & 275 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.