mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-05-14 02:14:52 +08:00
a few bugfixes
This commit is contained in:
@@ -23,8 +23,8 @@ let FirstUpdateTest = createTestCaseComponent(
|
||||
};
|
||||
},
|
||||
async () => {
|
||||
let update = await CodePush.checkForUpdate()
|
||||
assert.deepEqual(update, Object.assign(serverPackage, PackageMixins.remote), "checkForUpdate did not return the update from the server");
|
||||
let update = await CodePush.checkForUpdate();
|
||||
assert.equal(JSON.stringify(update), JSON.stringify({ ...serverPackage, ...PackageMixins.remote, failedInstall: false }), "checkForUpdate did not return the update from the server");
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ let NewUpdateTest = createTestCaseComponent(
|
||||
};
|
||||
},
|
||||
async () => {
|
||||
let update = await CodePush.checkForUpdate()
|
||||
assert.deepEqual(update, Object.assign(serverPackage, PackageMixins.remote), "checkForUpdate did not return the update from the server");
|
||||
let update = await CodePush.checkForUpdate();
|
||||
assert.equal(JSON.stringify(update), JSON.stringify({ ...serverPackage, ...PackageMixins.remote, failedInstall: false }), "checkForUpdate did not return the update from the server");
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ let RemotePackageAppVersionNewerTest = createTestCaseComponent(
|
||||
};
|
||||
},
|
||||
async () => {
|
||||
let update = await CodePush.checkForUpdate()
|
||||
let update = await CodePush.checkForUpdate();
|
||||
assert(!update, "checkForUpdate should not return an update if remote package is of a different binary version");
|
||||
}
|
||||
);
|
||||
|
||||
@@ -24,8 +24,8 @@ let SwitchDeploymentKeyTest = createTestCaseComponent(
|
||||
};
|
||||
},
|
||||
async () => {
|
||||
let update = await CodePush.checkForUpdate(deploymentKey)
|
||||
assert.deepEqual(update, Object.assign(serverPackage, PackageMixins.remote), "checkForUpdate did not return the update from the server");
|
||||
let update = await CodePush.checkForUpdate(deploymentKey);
|
||||
assert.equal(JSON.stringify(update), JSON.stringify({ ...serverPackage, ...PackageMixins.remote, failedInstall: false }), "checkForUpdate did not return the update from the server");
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user