Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f410588

Browse files
committedNov 29, 2024··
Fix tests
1 parent 775e8cb commit f410588

File tree

11 files changed

+11
-149
lines changed

11 files changed

+11
-149
lines changed
 

‎packages/core/babel.config.js‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,7 @@ module.exports = (api) => {
22
const isTest = api.env("test");
33

44
return {
5-
presets: [
6-
[
7-
"module:metro-react-native-babel-preset",
8-
{
9-
/**
10-
* Addresses issue caused on snack that leads to `Unable to resolve module 'app/node_modules/@babel/runtime/helpers/interopRequireDefault.js'`
11-
* See: https://github.com/expo/snack/pull/302
12-
* Always false for tests for jest to work
13-
*/
14-
disableImportExportTransform: !isTest,
15-
},
16-
],
17-
],
5+
presets: ["@react-native/babel-preset"],
186
plugins: [
197
"@babel/plugin-transform-export-namespace-from",
208
"react-native-reanimated/plugin",

‎packages/core/package.json‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,8 @@
9999
"@types/lodash.omit": "^4.5.6",
100100
"@types/lodash.tonumber": "^4.0.6",
101101
"@types/uuid": "^10.0.0",
102-
"metro-react-native-babel-preset": "^0.77.0",
103102
"react-native-avoid-softinput": "^4.0.1"
104103
},
105-
"eslintIgnore": [
106-
"node_modules/",
107-
"lib/"
108-
],
109104
"jest": {
110105
"preset": "jest-expo",
111106
"setupFilesAfterEnv": [
@@ -118,7 +113,7 @@
118113
"declarations.d.ts"
119114
],
120115
"transformIgnorePatterns": [
121-
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)"
116+
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg|dateformat)"
122117
],
123118
"testEnvironment": "node"
124119
}

‎packages/maps/babel.config.js‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@ module.exports = (api) => {
22
const isTest = api.env("test");
33

44
return {
5-
presets: [
6-
[
7-
"module:metro-react-native-babel-preset",
8-
{
9-
/**
10-
* Addresses issue caused on snack that leads to `Unable to resolve module 'app/node_modules/@babel/runtime/helpers/interopRequireDefault.js'`
11-
* See: https://github.com/expo/snack/pull/302
12-
* Always false for tests for jest to work
13-
*/
14-
disableImportExportTransform: !isTest,
15-
},
16-
],
17-
],
5+
presets: ["@react-native/babel-preset"],
186
};
197
};

‎packages/maps/package.json‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@
4848
"react-native-maps": "1.14.0",
4949
"react-native-webview": "13.8.6"
5050
},
51-
"eslintIgnore": [
52-
"node_modules/",
53-
"lib/"
54-
],
5551
"jest": {
5652
"preset": "jest-expo",
5753
"setupFilesAfterEnv": [
@@ -63,12 +59,11 @@
6359
"__mocks__"
6460
],
6561
"transformIgnorePatterns": [
66-
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)"
62+
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg|dateformat)"
6763
],
6864
"testEnvironment": "node"
6965
},
7066
"devDependencies": {
71-
"@types/lodash.isequal": "^4.5.6",
72-
"metro-react-native-babel-preset": "^0.77.0"
67+
"@types/lodash.isequal": "^4.5.6"
7368
}
7469
}

‎packages/native/babel.config.js‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@ module.exports = (api) => {
22
const isTest = api.env("test");
33

44
return {
5-
presets: [
6-
[
7-
"module:metro-react-native-babel-preset",
8-
{
9-
/**
10-
* Addresses issue caused on snack that leads to `Unable to resolve module 'app/node_modules/@babel/runtime/helpers/interopRequireDefault.js'`
11-
* See: https://github.com/expo/snack/pull/302
12-
* Always false for tests for jest to work
13-
*/
14-
disableImportExportTransform: !isTest,
15-
},
16-
],
17-
],
5+
presets: ["@react-native/babel-preset"],
186
};
197
};

‎packages/native/package.json‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,7 @@
4848
"react-native-svg": "15.2.0",
4949
"react-native-webview": "13.8.6"
5050
},
51-
"devDependencies": {
52-
"metro-react-native-babel-preset": "^0.77.0"
53-
},
54-
"eslintIgnore": [
55-
"node_modules/",
56-
"lib/"
57-
],
51+
"devDependencies": {},
5852
"jest": {
5953
"preset": "react-native",
6054
"setupFilesAfterEnv": [

‎packages/theme/babel.config.js‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@ module.exports = (api) => {
22
const isTest = api.env("test");
33

44
return {
5-
presets: [
6-
[
7-
"module:metro-react-native-babel-preset",
8-
{
9-
/**
10-
* Addresses issue caused on snack that leads to `Unable to resolve module 'app/node_modules/@babel/runtime/helpers/interopRequireDefault.js'`
11-
* See: https://github.com/expo/snack/pull/302
12-
* Always false for tests for jest to work
13-
*/
14-
disableImportExportTransform: !isTest,
15-
},
16-
],
17-
],
5+
presets: ["@react-native/babel-preset"],
186
};
197
};

‎packages/theme/package.json‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,7 @@
4646
"react-native-typography": "^1.4.1",
4747
"zod": "^3.23.8"
4848
},
49-
"eslintIgnore": [
50-
"node_modules/",
51-
"lib/"
52-
],
53-
"devDependencies": {
54-
"metro-react-native-babel-preset": "^0.77.0"
55-
},
49+
"devDependencies": {},
5650
"jest": {
5751
"preset": "jest-expo",
5852
"setupFilesAfterEnv": [

‎packages/ui/babel.config.js‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,7 @@ module.exports = (api) => {
22
const isTest = api.env("test");
33

44
return {
5-
presets: [
6-
[
7-
"module:metro-react-native-babel-preset",
8-
{
9-
/**
10-
* Addresses issue caused on snack that leads to `Unable to resolve module 'app/node_modules/@babel/runtime/helpers/interopRequireDefault.js'`
11-
* See: https://github.com/expo/snack/pull/302
12-
* Always false for tests for jest to work
13-
*/
14-
disableImportExportTransform: !isTest,
15-
},
16-
],
17-
],
5+
presets: ["@react-native/babel-preset"],
186
plugins: [
197
"@babel/plugin-transform-export-namespace-from",
208
"react-native-reanimated/plugin",

‎packages/ui/package.json‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,7 @@
4848
"@draftbit/theme": "51.0.0",
4949
"react-native-reanimated": "~3.10.1"
5050
},
51-
"devDependencies": {
52-
"metro-react-native-babel-preset": "^0.77.0"
53-
},
54-
"eslintIgnore": [
55-
"node_modules/",
56-
"lib/"
57-
],
51+
"devDependencies": {},
5852
"jest": {
5953
"preset": "react-native",
6054
"setupFilesAfterEnv": [

‎yarn.lock‎

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -9148,51 +9148,6 @@ metro-minify-terser@0.80.12:
91489148
flow-enums-runtime "^0.0.6"
91499149
terser "^5.15.0"
91509150

9151-
metro-react-native-babel-preset@^0.77.0:
9152-
version "0.77.0"
9153-
resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.77.0.tgz#47457eca8e36b77156afbe790247a70dbb40faaa"
9154-
integrity sha512-HPPD+bTxADtoE4y/4t1txgTQ1LVR6imOBy7RMHUsqMVTbekoi8Ph5YI9vKX2VMPtVWeFt0w9YnCSLPa76GcXsA==
9155-
dependencies:
9156-
"@babel/core" "^7.20.0"
9157-
"@babel/plugin-proposal-async-generator-functions" "^7.0.0"
9158-
"@babel/plugin-proposal-class-properties" "^7.18.0"
9159-
"@babel/plugin-proposal-export-default-from" "^7.0.0"
9160-
"@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.0"
9161-
"@babel/plugin-proposal-numeric-separator" "^7.0.0"
9162-
"@babel/plugin-proposal-object-rest-spread" "^7.20.0"
9163-
"@babel/plugin-proposal-optional-catch-binding" "^7.0.0"
9164-
"@babel/plugin-proposal-optional-chaining" "^7.20.0"
9165-
"@babel/plugin-syntax-dynamic-import" "^7.8.0"
9166-
"@babel/plugin-syntax-export-default-from" "^7.0.0"
9167-
"@babel/plugin-syntax-flow" "^7.18.0"
9168-
"@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0"
9169-
"@babel/plugin-syntax-optional-chaining" "^7.0.0"
9170-
"@babel/plugin-transform-arrow-functions" "^7.0.0"
9171-
"@babel/plugin-transform-async-to-generator" "^7.20.0"
9172-
"@babel/plugin-transform-block-scoping" "^7.0.0"
9173-
"@babel/plugin-transform-classes" "^7.0.0"
9174-
"@babel/plugin-transform-computed-properties" "^7.0.0"
9175-
"@babel/plugin-transform-destructuring" "^7.20.0"
9176-
"@babel/plugin-transform-flow-strip-types" "^7.20.0"
9177-
"@babel/plugin-transform-function-name" "^7.0.0"
9178-
"@babel/plugin-transform-literals" "^7.0.0"
9179-
"@babel/plugin-transform-modules-commonjs" "^7.0.0"
9180-
"@babel/plugin-transform-named-capturing-groups-regex" "^7.0.0"
9181-
"@babel/plugin-transform-parameters" "^7.0.0"
9182-
"@babel/plugin-transform-react-display-name" "^7.0.0"
9183-
"@babel/plugin-transform-react-jsx" "^7.0.0"
9184-
"@babel/plugin-transform-react-jsx-self" "^7.0.0"
9185-
"@babel/plugin-transform-react-jsx-source" "^7.0.0"
9186-
"@babel/plugin-transform-runtime" "^7.0.0"
9187-
"@babel/plugin-transform-shorthand-properties" "^7.0.0"
9188-
"@babel/plugin-transform-spread" "^7.0.0"
9189-
"@babel/plugin-transform-sticky-regex" "^7.0.0"
9190-
"@babel/plugin-transform-typescript" "^7.5.0"
9191-
"@babel/plugin-transform-unicode-regex" "^7.0.0"
9192-
"@babel/template" "^7.0.0"
9193-
babel-plugin-transform-flow-enums "^0.0.2"
9194-
react-refresh "^0.4.0"
9195-
91969151
metro-resolver@0.80.12:
91979152
version "0.80.12"
91989153
resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.80.12.tgz#e3815914c21315b04db200032c3243a4cc22dfb6"
@@ -11080,11 +11035,6 @@ react-refresh@^0.14.0, react-refresh@^0.14.2:
1108011035
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9"
1108111036
integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==
1108211037

11083-
react-refresh@^0.4.0:
11084-
version "0.4.3"
11085-
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.3.tgz#966f1750c191672e76e16c2efa569150cc73ab53"
11086-
integrity sha512-Hwln1VNuGl/6bVwnd0Xdn1e84gT/8T9aYNL+HAKDArLCS7LWjwr7StE30IEYbIkx0Vi3vs+coQxe+SQDbGbbpA==
11087-
1108811038
react-shallow-renderer@^16.15.0:
1108911039
version "16.15.0"
1109011040
resolved "https://registry.yarnpkg.com/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz#48fb2cf9b23d23cde96708fe5273a7d3446f4457"

0 commit comments

Comments
 (0)
Please sign in to comment.