fix(dev-infra): update type castings for JSON.parse usage (#40710)
Update usages of JSON.parse to be cast as specific types. PR Close #40710
This commit is contained in:
committed by
Alex Rickabaugh
parent
2c90391d4b
commit
cbdb5e208e
@@ -112,12 +112,14 @@ describe('@angular/common ng_package', () => {
|
||||
}
|
||||
// https://github.com/angular/common-builds/blob/master/package.json
|
||||
it('/', () => {
|
||||
const actual = JSON.parse(fs.readFileSync('package.json', {encoding: 'utf-8'})) as PackageJson;
|
||||
const actual =
|
||||
JSON.parse(fs.readFileSync('package.json', {encoding: 'utf-8'})) as PackageJson;
|
||||
expect(actual['main']).toEqual('./bundles/common.umd.js');
|
||||
});
|
||||
// https://github.com/angular/common-builds/blob/master/http/package.json
|
||||
it('/http', () => {
|
||||
const actual = JSON.parse(fs.readFileSync('http/package.json', {encoding: 'utf-8'})) as PackageJson;
|
||||
const actual =
|
||||
JSON.parse(fs.readFileSync('http/package.json', {encoding: 'utf-8'})) as PackageJson;
|
||||
expect(actual['main']).toEqual('../bundles/common-http.umd.js');
|
||||
expect(actual['es2015']).toEqual('../fesm2015/http.js');
|
||||
expect(actual['module']).toEqual('../fesm2015/http.js');
|
||||
@@ -132,7 +134,8 @@ describe('@angular/common ng_package', () => {
|
||||
// https://github.com/angular/common-builds/blob/master/http/testing/package.json
|
||||
it('/http/testing', () => {
|
||||
const actual =
|
||||
JSON.parse(fs.readFileSync('http/testing/package.json', {encoding: 'utf-8'})) as PackageJson;
|
||||
JSON.parse(fs.readFileSync('http/testing/package.json', {encoding: 'utf-8'})) as
|
||||
PackageJson;
|
||||
expect(actual['main']).toEqual('../../bundles/common-http-testing.umd.js');
|
||||
expect(actual['es2015']).toEqual('../../fesm2015/http/testing.js');
|
||||
expect(actual['module']).toEqual('../../fesm2015/http/testing.js');
|
||||
|
||||
Reference in New Issue
Block a user