Files
react-native-code-push/test/template/scenarios/updateNARConditional.js
scottbommarito 7ae7b48eac server url pls
2016-05-13 17:22:34 -07:00

19 lines
698 B
JavaScript

var CodePushWrapper = require("../codePushWrapper.js");
import CodePush from "react-native-code-push";
module.exports = {
startTest: function(testApp) {
testApp.readyAfterUpdate((responseBody) => {
if (responseBody !== "SKIP_NOTIFY_APPLICATION_READY") {
CodePush.notifyAppReady();
CodePushWrapper.checkAndInstall(testApp, undefined, undefined, CodePush.InstallMode.ON_NEXT_RESTART);
} else {
testApp.setStateAndSendMessage("Skipping notifyApplicationReady!", "SKIPPED_NOTIFY_APPLICATION_READY");
}
});
},
getScenarioName: function() {
return "Conditional Update";
}
};