Skip to content

Commit 6fdcc03

Browse files
fix: copilot comment
1 parent 08a7c43 commit 6fdcc03

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

src/__tests__/native/className-with-style.test.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,21 @@ test("View with multiple className properties where inline style takes precedenc
9999
]);
100100
});
101101

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+
102117
/**
103118
* Tests for style={undefined} not destroying computed className styles.
104119
*
@@ -179,21 +194,6 @@ describe("style={undefined} should not destroy computed className styles", () =>
179194
});
180195
});
181196

182-
test("FlatList: className should map to style", () => {
183-
registerCSS(`.bg-red { background-color: red; }`);
184-
185-
const component = render(
186-
<FlatList
187-
testID={testID}
188-
data={[]}
189-
renderItem={() => null}
190-
className="bg-red"
191-
/>,
192-
).getByTestId(testID);
193-
194-
expect(component.props.style).toStrictEqual({ backgroundColor: "#f00" });
195-
});
196-
197197
// Path B: FlatList with columnWrapperClassName (another non-"style" array target)
198198
test("FlatList: contentContainerClassName with contentContainerStyle={undefined}", () => {
199199
registerCSS(`.p-4 { padding: 16px; }`);

0 commit comments

Comments
 (0)