Skip to content

Commit

Permalink
workaround for failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brainbicycle committed Sep 18, 2023
1 parent 17a15d0 commit cce79f2
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/app/system/codepush.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@ export const canaryKey = codePushCanaryKey ?? "Canary_Key"
* CodePush options documented here: https://learn.microsoft.com/en-us/appcenter/distribution/codepush/rn-api-ref
* We could for example show an update alert to the user when an update is available in betas.
*/
export const codePushOptions = ArtsyNativeModule.isBetaOrDev
? {

const options = () => {
if (__TEST__) {
return {}
} else if (ArtsyNativeModule.isBetaOrDev) {
return {
deploymentKey: stagingKey,
checkFrequency: codePush.CheckFrequency.MANUAL,
}
: { deploymentKey: codePushProdKey }
} else {
return { deploymentKey: codePushProdKey }
}
}

export const codePushOptions = options()

0 comments on commit cce79f2

Please sign in to comment.