MCPcopy Index your code
hub / github.com/angular/angular-cli / fakeCoreVersion

Function fakeCoreVersion

tests/e2e/tests/misc/supported-angular.ts:19–23  ·  view source on GitHub ↗
(newMajor: number)

Source from the content-addressed store, hash-verified

17
18 // Fake version by writing over the @angular/core version, since that's what the CLI checks.
19 const fakeCoreVersion = async (newMajor: number) => {
20 const tmpPkgJson = JSON.parse(originalAngularCorePkgJson);
21 tmpPkgJson.version = `${newMajor}.0.0`;
22 await writeFile(angularCorePkgPath, JSON.stringify(tmpPkgJson));
23 };
24
25 // Major should succeed, but we don't need to test it here since it's tested everywhere else.
26 // Major+1 and -1 should fail architect commands, but allow other commands.

Callers 1

Calls 1

writeFileFunction · 0.90

Tested by

no test coverage detected