a few bugfixes

This commit is contained in:
Geoffrey Goh
2015-12-24 14:31:02 -08:00
parent 89d5c14d14
commit ad3cd211f8
6 changed files with 32 additions and 26 deletions

View File

@@ -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");
}
);

View File

@@ -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");
}
);

View File

@@ -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");
}
);

View File

@@ -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");
}
);