mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-17 03:59:19 +08:00
19 lines
660 B
JavaScript
19 lines
660 B
JavaScript
var CodePushWrapper = require("../codePushWrapper.js");
|
|
import CodePush from "react-native-code-push";
|
|
|
|
module.exports = {
|
|
startTest: function(testApp) {
|
|
testApp.sendCurrentAndPendingPackage()
|
|
.then(() => {
|
|
CodePushWrapper.sync(testApp, (status) => {
|
|
if (status === CodePush.SyncStatus.UPDATE_INSTALLED) {
|
|
testApp.sendCurrentAndPendingPackage().then(CodePush.restartApp);
|
|
}
|
|
}, undefined, { installMode: CodePush.InstallMode.ON_NEXT_RESTART });
|
|
});
|
|
},
|
|
|
|
getScenarioName: function() {
|
|
return "Restart";
|
|
}
|
|
}; |