fix(common): `locales` are not being shipped (#23136)

Closes: #23140, #23103

PR Close #23136
This commit is contained in:
Alan Agius 2018-04-03 17:21:42 +02:00 committed by Alex Rickabaugh
parent 580f05bd9c
commit 7ca772060b
2 changed files with 18 additions and 0 deletions

View File

@ -13,6 +13,21 @@ import * as shx from 'shelljs';
shx.cd(path.join(process.env['TEST_SRCDIR'], 'angular', 'packages', 'common', 'npm_package'));
describe('@angular/common ng_package', () => {
it('should have the locales files', () => {
it('/locales', () => {
const files = shx.ls('-R', 'locales').stdout.split('\n');
expect(files.some(n => n.endsWith('.d.ts'))).toBe(true, `.d.ts files don't exist`);
expect(files.some(n => n.endsWith('.js'))).toBe(true, `.js files don't exist`);
expect(files.some(n => n.endsWith('.js.map'))).toBe(true, `.js.map files don't exist`);
});
it('/locales/extra', () => {
const files = shx.ls('-R', 'locales/extra').stdout.split('\n');
expect(files.some(n => n.endsWith('.d.ts'))).toBe(true, `.d.ts files don't exist`);
expect(files.some(n => n.endsWith('.js'))).toBe(true, `.js files don't exist`);
expect(files.some(n => n.endsWith('.js.map'))).toBe(true, `.js.map files don't exist`);
});
});
it('should have right bundle files', () => {
expect(shx.ls('-R', 'bundles').stdout.split('\n').filter(n => !!n).sort()).toEqual([
'common-http-testing.umd.js',

View File

@ -25,6 +25,9 @@ ng_package(
"//packages/common/http/testing:package.json",
"//packages/common/testing:package.json",
],
data = [
"//packages/common/locales",
],
entry_point = "packages/common/index.js",
tags = ["release-with-framework"],
deps = [