|
1 | 1 | import { join } from 'path';
|
2 | 2 | import { getGlobalVariable } from '../../utils/env';
|
3 | 3 | import { expectFileToMatch, writeFile } from '../../utils/fs';
|
4 |
| -import { installPackage, uninstallPackage } from '../../utils/packages'; |
| 4 | +import { uninstallPackage } from '../../utils/packages'; |
5 | 5 | import { ng } from '../../utils/process';
|
6 | 6 | import { expectToFail } from '../../utils/utils';
|
7 | 7 | import { readNgVersion } from '../../utils/version';
|
@@ -36,15 +36,16 @@ export default async function () {
|
36 | 36 | // Install correct version
|
37 | 37 | let localizeVersion = '@angular/localize@' + readNgVersion();
|
38 | 38 | if (getGlobalVariable('argv')['ng-snapshots']) {
|
39 |
| - localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; |
| 39 | + // The snapshots job won't work correctly because 'ng add' doesn't support github URLs |
| 40 | + // localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; |
| 41 | + return; |
40 | 42 | }
|
41 |
| - await installPackage(localizeVersion); |
| 43 | + await ng('add', localizeVersion, '--skip-confirmation'); |
42 | 44 |
|
43 | 45 | // Should not show any warnings when extracting
|
44 | 46 | const { stderr: message5 } = await ng('extract-i18n');
|
45 | 47 | if (message5.includes('WARNING')) {
|
46 |
| - // TODO: enable once https://github.com/angular/angular/pull/56300 is released. |
47 |
| - // throw new Error('Expected no warnings to be shown. STDERR:\n' + message5); |
| 48 | + throw new Error('Expected no warnings to be shown. STDERR:\n' + message5); |
48 | 49 | }
|
49 | 50 |
|
50 | 51 | await expectFileToMatch('messages.xlf', 'Hello world');
|
|
0 commit comments