Github user TimBarham commented on a diff in the pull request:
https://github.com/apache/cordova-lib/pull/332#discussion_r43331295
--- Diff: cordova-lib/spec-cordova/save.spec.js ---
@@ -244,19 +307,26 @@ describe('(save flag)', function () {
console.log(err);
expect(false).toBe(true);
done();
+ }).finally(function () {
+ revertDownloadPlatform();
});
- }, timeout);
+ }, TIMEOUT);
it('spec.11 should update spec with git url when updating using
git url', function (done) {
helpers.setEngineSpec(appPath, platformName,
platformVersionNew);
- platform('add', platformName + '@' + platformVersionNew)
+ mockDownloadPlatform(platformLocalPathOld, platformVersionOld);
+
+ platform('add', platformName + '@' + platformVersionOld)
.then(function () {
+ revertDownloadPlatform();
var fsExistsSync = fs.existsSync.bind(fs);
spyOn(fs, 'existsSync').andCallFake(function (somePath) {
return (somePath === path.join(appPath, 'platforms',
platformName)) || fsExistsSync(somePath);
});
+ mockDownloadPlatform(platformLocalPathNew,
platformVersionNew);
--- End diff --
I think we want to have tests for these scenarios so we can verify things
aren't being broken at PR/commit time rather than waiting until we're about to
do a release.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]