We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afdbb86 commit 95e9ee7Copy full SHA for 95e9ee7
src/__tests__/native/className-with-style.test.tsx
@@ -99,6 +99,21 @@ test("View with multiple className properties where inline style takes precedenc
99
]);
100
});
101
102
+test("FlatList: className should map to style", () => {
103
+ registerCSS(`.bg-red { background-color: red; }`);
104
+
105
+ const component = render(
106
+ <FlatList
107
+ testID={testID}
108
+ data={[]}
109
+ renderItem={() => null}
110
+ className="bg-red"
111
+ />,
112
+ ).getByTestId(testID);
113
114
+ expect(component.props.style).toStrictEqual({ backgroundColor: "#f00" });
115
+});
116
117
/**
118
* Tests for style={undefined} not destroying computed className styles.
119
*
0 commit comments