Skip to content

Commit

Permalink
test: fix the update test and disable it conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl authored and filipesilva committed Mar 28, 2018
1 parent 33a6823 commit 461cd0b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/e2e/tests/basic/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { updateJsonFile } from '../../utils/project';


export default function () {
// Disable this e2e as it takes about 10 minutes on a good computer and is flaky.
if (!process.env['E2E_UPDATE']) {
return Promise.resolve();
}

let origPackageJson: string;
let origCoreVersion: string;
let origCliVersion: string;
Expand All @@ -24,19 +29,14 @@ export default function () {
origCoreVersion = obj.dependencies['@angular/core'];
origCliVersion = obj.devDependencies['@angular/cli'];
origTypeScriptVersion = obj.devDependencies['typescript'];
updateVersions(obj.dependencies);
updateVersions(obj.devDependencies);
obj.devDependencies['@angular/cli'] = '1.6.5';
obj.devDependencies['typescript'] = '2.0.2';
obj.dependencies['rxjs'] = '5.0.0-beta.12';
}))
.then(() => ng('update'))
.then(() => ng('update', '@angular/cli', 'typescript'))
.then(() => readFile('package.json'))
.then(s => {
const obj = JSON.parse(s);
if (origCoreVersion === obj.dependencies['@angular/core']) {
throw new Error('Angular Core version not updated');
}
if (origCliVersion === obj.devDependencies['@angular/cli']) {
throw new Error('CLI version not updated');
}
Expand Down

0 comments on commit 461cd0b

Please sign in to comment.