Skip to content
Open
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
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"dependencies": {
"@fullstory/babel-plugin-annotate-react": "^2.3.2",
"@fullstory/babel-plugin-react-native": "^1.6.1"
"@fullstory/babel-plugin-react-native": "^1.6.3"
},
"peerDependencies": {
"expo": ">=47.0.0",
Expand Down
31 changes: 14 additions & 17 deletions src/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,23 +151,20 @@ describe('Reading FS properties on iOS', () => {
expect(ref).toHaveBeenLastCalledWith(null);
});

it.failing(
'custom component with FS attributes does not have phantom ref injected into its props',
() => {
const childRef = React.createRef<View>();

const CustomComponent = (props: { fsClass?: string; children?: React.ReactNode }) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { fsClass: _fsClass, ...rest } = props;
return <View ref={childRef} {...rest} />;
};

render(<CustomComponent fsClass={fsClassValue} />);

expect(childRef.current).not.toBeNull();
expect((childRef.current as any)?._reactInternals?.type).toBe(View);
},
);
it('custom component with FS attributes does not have phantom ref injected into its props', () => {
const childRef = React.createRef<View>();

const CustomComponent = (props: { fsClass?: string; children?: React.ReactNode }) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { fsClass: _fsClass, ...rest } = props;
return <View ref={childRef} {...rest} />;
};

render(<CustomComponent fsClass={fsClassValue} />);

expect(childRef.current).not.toBeNull();
expect((childRef.current as any)?._reactInternals?.type).toBe(View);
});

it('component without FS attributes does not trigger setBatchProperties', () => {
render(<View />);
Expand Down