diff --git a/package.json b/package.json index 54e5d51..e0d42f1 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "jest": "^29.7.0", "metro-react-native-babel-preset": "^0.77.0", "prettier": "^3.2.5", + "react": "^18.2.0", "react-native": "^0.73.4", "react-native-typescript-transformer": "^1.2.13", "semantic-release": "^23.0.2", @@ -74,8 +75,7 @@ "js" ], "transform": { - "^.+\\.(js)$": "/node_modules/babel-jest", - "\\.(ts|tsx)$": "ts-jest" + "^.+\\.(js|ts|tsx)$": "/node_modules/babel-jest" }, "setupFiles": [ "./tests/setup.ts" diff --git a/tests/setup.ts b/tests/setup.ts index 33ad020..c338026 100644 --- a/tests/setup.ts +++ b/tests/setup.ts @@ -10,4 +10,10 @@ jest.mock('react-native', () => ({ Platform: { OS: 'ios', }, + StyleSheet: { + create: (r) => r, + }, + Dimensions: { + get: () => ({width: 375, height: 667}), + }, })); diff --git a/yarn.lock b/yarn.lock index 0aa5e97..02c33de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8010,6 +8010,13 @@ react-shallow-renderer@^16.15.0: object-assign "^4.1.1" react-is "^16.12.0 || ^17.0.0 || ^18.0.0" +react@^18.2.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== + dependencies: + loose-envify "^1.1.0" + read-cmd-shim@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz#640a08b473a49043e394ae0c7a34dd822c73b9bb"