Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@babel/preset-react": "^7.25.9",
"@babel/preset-typescript": "^7.26.0",
"@callstack/eslint-config": "^15.0.0",
"@react-native/babel-preset": "^0.76.1",
"@react-native/babel-preset": "0.77.0-nightly-20241105-fe656be26",
"@release-it/conventional-changelog": "^9.0.2",
"@relmify/jest-serializer-strip-ansi": "^1.0.2",
"@types/jest": "^29.5.14",
Expand All @@ -82,13 +82,14 @@
"babel-plugin-module-resolver": "^5.0.2",
"del-cli": "^6.0.0",
"eslint": "^8.57.1",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-prettier": "^4.2.1",
"flow-bin": "~0.170.0",
"jest": "^29.7.0",
"prettier": "^2.8.8",
"react": "18.3.1",
"react-native": "0.76.1",
"react-test-renderer": "18.3.1",
"react": "19.0.0-rc-fb9a90fa48-20240614",
"react-native": "0.77.0-nightly-20241105-fe656be26",
"react-test-renderer": "19.0.0-rc-fb9a90fa48-20240614",
"release-it": "^17.10.0",
"strip-ansi": "^6.0.1",
"typescript": "^5.6.3"
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/host-component-names.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
import { Image, Modal, ScrollView, Switch, Text, TextInput } from 'react-native';
import { render, screen } from '..';
import {
isHostImage,
isHostModal,
Expand All @@ -8,7 +9,6 @@ import {
isHostText,
isHostTextInput,
} from '../helpers/host-component-names';
import { render, screen } from '..';

test('detects host Text component', () => {
render(<Text>Hello</Text>);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ describe('AnimatedView', () => {
jest.useRealTimers();
});

it('should use native driver when useNativeDriver is true', async () => {
it('works when useNativeDriver is false', async () => {
render(
<AnimatedView fadeInDuration={250} useNativeDriver={true}>
<AnimatedView fadeInDuration={250} useNativeDriver={false}>
Test
</AnimatedView>,
);
Expand All @@ -53,15 +53,16 @@ describe('AnimatedView', () => {
expect(screen.root).toHaveStyle({ opacity: 1 });
});

it('should not use native driver when useNativeDriver is false', async () => {
it('does not crash when useNativeDriver is true', async () => {
render(
<AnimatedView fadeInDuration={250} useNativeDriver={false}>
<AnimatedView fadeInDuration={250} useNativeDriver={true}>
Test
</AnimatedView>,
);
expect(screen.root).toHaveStyle({ opacity: 0 });

await act(() => jest.advanceTimersByTime(250));
expect(screen.root).toHaveStyle({ opacity: 1 });
// Native driver does not work in Jest tests
// expect(screen.root).toHaveStyle({ opacity: 1 });
});
});
Loading
Loading