Skip to content

Commit 50e035f

Browse files
authored
chore: move native tests (#119)
1 parent d525314 commit 50e035f

28 files changed

Lines changed: 32 additions & 27 deletions
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/runtime/native/__tests__/keywords.test.tsx renamed to src/__tests__/native/keywords.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { View } from "react-native";
22

33
import { renderHook } from "@testing-library/react-native";
44
import { registerCSS } from "react-native-css/jest";
5-
6-
import { useNativeCss } from "../react/useNativeCss";
5+
import { useNativeCss } from "react-native-css/runtime/native";
76

87
test("unset", () => {
98
registerCSS(`.my-class { background-color: unset; }`);

src/runtime/native/__tests__/media-query.test.tsx renamed to src/__tests__/native/media-query.test.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { PixelRatio } from "react-native";
33
import { act, render, screen } from "@testing-library/react-native";
44
import { View } from "react-native-css/components/View";
55
import { registerCSS, testID } from "react-native-css/jest";
6+
import { colorScheme } from "react-native-css/runtime";
67

7-
import { colorScheme } from "../api";
8-
import { dimensions } from "../reactivity";
8+
import { dimensions } from "../../runtime/native/reactivity";
99

1010
jest.mock("react-native", () => {
1111
const RN = jest.requireActual("react-native");
@@ -105,10 +105,7 @@ test("width (range)", () => {
105105
});
106106

107107
act(() => {
108-
dimensions.set({
109-
...dimensions.get(),
110-
width: 500,
111-
});
108+
dimensions.set({ ...dimensions.get(), width: 500 });
112109
});
113110

114111
expect(component.props.style).toStrictEqual({
File renamed without changes.

0 commit comments

Comments
 (0)