Skip to content

Commit

Permalink
[config-plugins][prebuild-config][jest-expo] fix unit tests (expo#23124)
Browse files Browse the repository at this point in the history
# Why

fix broken unit tests due to template changes and jest-expo changes

# How

- [config-plugins][prebuild-config] update test snapshot
- [jest-expo] add back the jest mock to fix expo-dev-client unit test

# Test Plan

ci passed
  • Loading branch information
Kudo authored Jun 27, 2023
1 parent d847ad2 commit b7484f5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ android {
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString())
}
signingConfigs {
debug {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,18 @@ exports[`built-in plugins introspects mods 1`] = `
{
"type": "empty",
},
{
"type": "comment",
"value": "Enable network inspector",
},
{
"key": "EX_DEV_CLIENT_NETWORK_INSPECTOR",
"type": "property",
"value": "true",
},
{
"type": "empty",
},
{
"type": "comment",
"value": "Remove this workaround when upgrading to [email protected]",
Expand Down Expand Up @@ -1299,6 +1311,7 @@ exports[`built-in plugins introspects mods 1`] = `
},
},
"podfileProperties": {
"EX_DEV_CLIENT_NETWORK_INSPECTOR": "true",
"expo.jsEngine": "hermes",
},
"splashScreenStoryboard": {
Expand Down
1 change: 1 addition & 0 deletions packages/jest-expo/src/preset/expoModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ module.exports = {
key: 'isRootedExperimentalAsync',
},
],
ExpoDevMenu: [],
ExpoDocumentPicker: [
{ name: 'getDocumentAsync', argumentsCount: 1, key: 'getDocumentAsync' },
],
Expand Down

0 comments on commit b7484f5

Please sign in to comment.