fix(common): `locales` are not being shipped (#23136)
Closes: #23140, #23103 PR Close #23136
This commit is contained in:
parent
580f05bd9c
commit
7ca772060b
|
@ -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',
|
||||
|
|
|
@ -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 = [
|
||||
|
|
Loading…
Reference in New Issue