Skip to content

Commit 355ae1a

Browse files
cexbrayatclydin
authored andcommitted
test: re-enable localize warning check
It can be re-enabled now that angular/angular#56300 have been released in v18.1.0-next.2
1 parent 27c2725 commit 355ae1a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/legacy-cli/e2e/tests/i18n/extract-ivy.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { join } from 'path';
22
import { getGlobalVariable } from '../../utils/env';
33
import { expectFileToMatch, writeFile } from '../../utils/fs';
4-
import { installPackage, uninstallPackage } from '../../utils/packages';
4+
import { uninstallPackage } from '../../utils/packages';
55
import { ng } from '../../utils/process';
66
import { expectToFail } from '../../utils/utils';
77
import { readNgVersion } from '../../utils/version';
@@ -36,15 +36,16 @@ export default async function () {
3636
// Install correct version
3737
let localizeVersion = '@angular/localize@' + readNgVersion();
3838
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;
4042
}
41-
await installPackage(localizeVersion);
43+
await ng('add', localizeVersion, '--skip-confirmation');
4244

4345
// Should not show any warnings when extracting
4446
const { stderr: message5 } = await ng('extract-i18n');
4547
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);
4849
}
4950

5051
await expectFileToMatch('messages.xlf', 'Hello world');

0 commit comments

Comments
 (0)