_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
angular-cli/tests/legacy-cli/e2e/tests/generate/class.ts_0_537 | import { join } from 'path';
import { ng } from '../../utils/process';
import { expectFileToExist } from '../../utils/fs';
export default function () {
const projectDir = join('src', 'app');
return (
ng('generate', 'class', 'test-class')
.then(() => expectFileToExist(projectDir))
.then(() => expec... | {
"end_byte": 537,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/class.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/schematic-aliases.ts_0_351 | import { ng } from '../../utils/process';
export default async function () {
const schematicNameVariation = [
'component',
'c',
'@schematics/angular:component',
'@schematics/angular:c',
];
for (const schematic of schematicNameVariation) {
await ng('generate', schematic, 'comp-name', '--displ... | {
"end_byte": 351,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/schematic-aliases.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/install-allow-scripts.ts_0_1518 | import { copyAssets } from '../../utils/assets';
import { expectFileNotToExist, expectFileToExist, rimraf } from '../../utils/fs';
import { ng } from '../../utils/process';
export default async function () {
// Copy test schematic into test project to ensure schematic dependencies are available
await copyAssets('s... | {
"end_byte": 1518,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/install-allow-scripts.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/help-output.ts_0_3738 | import { join } from 'path';
import { ng, ProcessOutput } from '../../utils/process';
import { writeMultipleFiles, createDir } from '../../utils/fs';
import { updateJsonFile } from '../../utils/project';
export default function () {
// setup temp collection
const genRoot = join('node_modules/fake-schematics/');
... | {
"end_byte": 3738,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/help-output.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/interface.ts_0_493 | import { join } from 'path';
import { ng } from '../../utils/process';
import { expectFileToExist } from '../../utils/fs';
export default function () {
const interfaceDir = join('src', 'app');
return (
ng('generate', 'interface', 'test-interface', 'model')
.then(() => expectFileToExist(interfaceDir))
... | {
"end_byte": 493,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/interface.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/help-output-no-duplicates.ts_0_545 | import { ng } from '../../utils/process';
export default async function () {
// Verify that there are no duplicate options
const { stdout } = await ng('generate', 'component', '--help');
const firstIndex = stdout.indexOf('--prefix');
if (firstIndex < 0) {
console.log(stdout);
throw new Error('--prefix... | {
"end_byte": 545,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/help-output-no-duplicates.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/schematics-collections.ts_0_3257 | import { join } from 'path';
import { ng } from '../../utils/process';
import { writeMultipleFiles, createDir, expectFileToExist } from '../../utils/fs';
import { updateJsonFile } from '../../utils/project';
export default async function () {
// setup temp collection
const genRoot = join('node_modules/fake-schemat... | {
"end_byte": 3257,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/schematics-collections.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/pipe/pipe-basic.ts_0_582 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist } from '../../../utils/fs';
export default function () {
// Create the pipe in the same directory.
const pipeDir = join('src', 'app');
return (
ng('generate', 'pipe', 'test-pipe')
.then(() => expectFi... | {
"end_byte": 582,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/pipe/pipe-basic.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/config/type-karma.ts_0_254 | import { ng } from '../../../utils/process';
import { useCIChrome } from '../../../utils/project';
export default async function () {
await ng('generate', 'config', 'karma');
await useCIChrome('test-project');
await ng('test', '--watch=false');
}
| {
"end_byte": 254,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/config/type-karma.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/config/type-browserslist.ts_0_154 | import { ng } from '../../../utils/process';
export default async function () {
await ng('generate', 'config', 'browserslist');
await ng('build');
}
| {
"end_byte": 154,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/config/type-browserslist.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/module/module-import.ts_0_2904 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToMatch } from '../../../utils/fs';
export default async function () {
const projectName = 'test-project-two';
await ng('generate', 'application', projectName, '--no-standalone', '--skip-install');
await ng('generate', '... | {
"end_byte": 2904,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/module/module-import.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/module/module-basic.ts_0_1096 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist, expectFileToMatch } from '../../../utils/fs';
import { expectToFail } from '../../../utils/utils';
import { useCIChrome, useCIDefaults } from '../../../utils/project';
export default async function () {
const projec... | {
"end_byte": 1096,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/module/module-basic.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/module/module-routing-child-folder.ts_0_1093 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist } from '../../../utils/fs';
import { expectToFail } from '../../../utils/utils';
import { useCIChrome, useCIDefaults } from '../../../utils/project';
export default async function () {
const projectName = 'test-proje... | {
"end_byte": 1093,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/module/module-routing-child-folder.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/component/component-inline-template.ts_0_1240 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist } from '../../../utils/fs';
import { updateJsonFile } from '../../../utils/project';
import { expectToFail } from '../../../utils/utils';
// tslint:disable:max-line-length
export default function () {
const component... | {
"end_byte": 1240,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/component/component-inline-template.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/component/component-child-dir.ts_0_1415 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { createDir, expectFileToExist, rimraf } from '../../../utils/fs';
export default async function () {
const currentDirectory = process.cwd();
const childDirectory = join('src', 'app', 'sub-dir');
try {
// Create and enter a chi... | {
"end_byte": 1415,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/component/component-child-dir.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/component/component-not-flat.ts_0_1109 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist } from '../../../utils/fs';
import { updateJsonFile } from '../../../utils/project';
export default function () {
const componentDir = join('src', 'app', 'test-component');
return (
Promise.resolve()
.th... | {
"end_byte": 1109,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/component/component-not-flat.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/component/component-flat.ts_0_1053 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist } from '../../../utils/fs';
import { updateJsonFile } from '../../../utils/project';
export default function () {
const appDir = join('src', 'app');
return (
Promise.resolve()
.then(() =>
updateJs... | {
"end_byte": 1053,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/component/component-flat.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/component/component-prefix.ts_0_1012 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToMatch } from '../../../utils/fs';
import { updateJsonFile } from '../../../utils/project';
export default function () {
const testCompDir = join('src', 'app', 'test-component');
const aliasCompDir = join('src', 'app', 'a... | {
"end_byte": 1012,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/component/component-prefix.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/component/component-path-case.ts_0_1808 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist, rimraf } from '../../../utils/fs';
export default async function () {
const upperDirs = join('non', 'existing', 'dir');
const rootDir = join('src', 'app', upperDirs);
const componentDirectory = join(rootDir, 't... | {
"end_byte": 1808,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/component/component-path-case.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/component/component-basic.ts_0_823 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist } from '../../../utils/fs';
export default function () {
const projectDir = join('src', 'app');
const componentDir = join(projectDir, 'test-component');
return (
ng('generate', 'component', 'test-component')... | {
"end_byte": 823,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/component/component-basic.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/library/library-basic.ts_0_356 | import { ng } from '../../../utils/process';
import { useCIChrome } from '../../../utils/project';
export default async function () {
await ng('generate', 'library', 'lib-ngmodule', '--no-standalone');
await useCIChrome('lib-ngmodule', 'projects/lib-ngmodule');
await ng('test', 'lib-ngmodule', '--no-watch');
a... | {
"end_byte": 356,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/library/library-basic.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/library/library-standalone.ts_0_363 | import { ng } from '../../../utils/process';
import { useCIChrome } from '../../../utils/project';
export default async function () {
await ng('generate', 'library', 'lib-standalone', '--standalone');
await useCIChrome('lib-standalone', 'projects/lib-standalone');
await ng('test', 'lib-standalone', '--no-watch')... | {
"end_byte": 363,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/library/library-standalone.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/directive/directive-prefix.ts_0_1853 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToMatch } from '../../../utils/fs';
import { updateJsonFile, useCIChrome, useCIDefaults } from '../../../utils/project';
export default function () {
const directiveDir = join('src', 'app');
return (
Promise.resolve()... | {
"end_byte": 1853,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/directive/directive-prefix.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/directive/directive-basic.ts_0_535 | import { ng } from '../../../utils/process';
import { join } from 'path';
import { expectFileToExist } from '../../../utils/fs';
export default function () {
const directiveDir = join('src', 'app');
return (
ng('generate', 'directive', 'test-directive')
.then(() => expectFileToExist(join(directiveDir, 't... | {
"end_byte": 535,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/directive/directive-basic.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/application/application-zoneless.ts_0_647 | import { ng } from '../../../utils/process';
import { useCIChrome } from '../../../utils/project';
export default async function () {
await ng('generate', 'app', 'standalone', '--experimental-zoneless', '--standalone');
await useCIChrome('standalone', 'projects/standalone');
await ng('test', 'standalone', '--wat... | {
"end_byte": 647,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/application/application-zoneless.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/application/application-basic.ts_0_405 | import { expectFileToMatch } from '../../../utils/fs';
import { ng } from '../../../utils/process';
import { useCIChrome } from '../../../utils/project';
export default function () {
return ng('generate', 'application', 'app2')
.then(() => expectFileToMatch('angular.json', /\"app2\":/))
.then(() => useCIChro... | {
"end_byte": 405,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/application/application-basic.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/service/service-basic.ts_0_605 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist } from '../../../utils/fs';
export default function () {
// Does not create a sub directory.
const serviceDir = join('src', 'app');
return (
ng('generate', 'service', 'test-service')
.then(() => expect... | {
"end_byte": 605,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/service/service-basic.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/guard/guard-basic.ts_0_647 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist, expectFileToMatch } from '../../../utils/fs';
export default async function () {
// Does not create a sub directory.
const guardDir = join('src', 'app');
await ng('generate', 'guard', 'test-guard');
await exp... | {
"end_byte": 647,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/guard/guard-basic.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/guard/guard-multiple-implements.ts_0_828 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist, expectFileToMatch } from '../../../utils/fs';
export default async function () {
// Does not create a sub directory.
const guardDir = join('src', 'app');
// multiple implements are only supported in (deprecated... | {
"end_byte": 828,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/guard/guard-multiple-implements.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/guard/guard-implements.ts_0_630 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist, expectFileToMatch } from '../../../utils/fs';
export default async function () {
// Does not create a sub directory.
const guardDir = join('src', 'app');
await ng('generate', 'guard', 'match', '--implements=Can... | {
"end_byte": 630,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/guard/guard-implements.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/generate/interceptor/interceptor-basic.ts_0_645 | import { join } from 'path';
import { ng } from '../../../utils/process';
import { expectFileToExist } from '../../../utils/fs';
export default function () {
// Does not create a sub directory.
const interceptorDir = join('src', 'app');
return (
ng('generate', 'interceptor', 'test-interceptor')
.then(... | {
"end_byte": 645,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/generate/interceptor/interceptor-basic.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/schematics_cli/blank-test.ts_0_924 | import { join } from 'node:path';
import { getGlobalVariable } from '../../utils/env';
import { exec, silentNpm } from '../../utils/process';
import { rimraf } from '../../utils/fs';
export default async function () {
// setup
const argv = getGlobalVariable('argv');
if (argv.noglobal) {
return;
}
await ... | {
"end_byte": 924,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/schematics_cli/blank-test.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/schematics_cli/schematic-test.ts_0_928 | import { join } from 'node:path';
import { getGlobalVariable } from '../../utils/env';
import { exec, silentNpm } from '../../utils/process';
import { rimraf } from '../../utils/fs';
export default async function () {
// setup
const argv = getGlobalVariable('argv');
if (argv.noglobal) {
return;
}
await ... | {
"end_byte": 928,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/schematics_cli/schematic-test.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/schematics_cli/basic.ts_0_1080 | import { join } from 'node:path';
import { getGlobalVariable } from '../../utils/env';
import { exec, execAndWaitForOutputToMatch, silentNpm } from '../../utils/process';
import { rimraf } from '../../utils/fs';
export default async function () {
// setup
const argv = getGlobalVariable('argv');
if (argv.noglobal... | {
"end_byte": 1080,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/schematics_cli/basic.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/unknown-configuration.ts_0_388 | import { ng } from '../../utils/process';
export default async function () {
try {
await ng('build', '--configuration', 'invalid');
throw new Error('should have failed.');
} catch (error) {
if (
!(
error instanceof Error &&
error.message.includes(`Configuration 'invalid' is not se... | {
"end_byte": 388,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/unknown-configuration.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/run-configuration-option.ts_0_822 | import { silentNg } from '../../utils/process';
import { expectToFail } from '../../utils/utils';
export default async function () {
const errorMatch = `Provide the configuration as part of the target 'ng run test-project:build:production`;
{
const { message } = await expectToFail(() =>
silentNg('run', ... | {
"end_byte": 822,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/run-configuration-option.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/project-cannot-be-determined-by-cwd.ts_0_1391 | import { join } from 'path';
import { execAndWaitForOutputToMatch, ng } from '../../utils/process';
import { updateJsonFile } from '../../utils/project';
import { expectToFail } from '../../utils/utils';
export default async function () {
const errorMessage =
'Cannot determine project for command.\n' +
'This... | {
"end_byte": 1391,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/project-cannot-be-determined-by-cwd.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/ng-new-collection.ts_0_525 | import { execAndWaitForOutputToMatch } from '../../utils/process';
export default async function () {
const currentDirectory = process.cwd();
try {
process.chdir('..');
// The below is a way to validate that the `--collection` option is being considered.
await execAndWaitForOutputToMatch(
'ng',... | {
"end_byte": 525,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/ng-new-collection.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/builder-project-by-cwd.ts_0_699 | import { join } from 'path';
import { expectFileToExist } from '../../utils/fs';
import { ng } from '../../utils/process';
export default async function () {
await ng('generate', 'app', 'second-app', '--skip-install');
await ng('generate', 'app', 'third-app', '--skip-install');
const startCwd = process.cwd();
... | {
"end_byte": 699,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/builder-project-by-cwd.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/unknown-option.ts_0_571 | import { execAndWaitForOutputToMatch, ng } from '../../utils/process';
import { expectToFail } from '../../utils/utils';
export default async function () {
await expectToFail(() => ng('build', '--notanoption'));
await execAndWaitForOutputToMatch(
'ng',
['build', '--notanoption'],
/Unknown argument: no... | {
"end_byte": 571,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/unknown-option.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/additional-properties.ts_0_1308 | import { createDir, rimraf, writeMultipleFiles } from '../../utils/fs';
import { execAndWaitForOutputToMatch } from '../../utils/process';
import { updateJsonFile } from '../../utils/project';
export default async function () {
await createDir('example-builder');
await writeMultipleFiles({
'example-builder/pac... | {
"end_byte": 1308,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/additional-properties.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/builder-not-found.ts_0_1457 | import { moveFile } from '../../utils/fs';
import { getActivePackageManager, installPackage, uninstallPackage } from '../../utils/packages';
import { execAndWaitForOutputToMatch, ng } from '../../utils/process';
import { expectToFail } from '../../utils/utils';
export default async function () {
try {
await unin... | {
"end_byte": 1457,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/builder-not-found.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/cache/cache-enable-disable.ts_0_489 | import { readFile } from '../../../utils/fs';
import { ng } from '../../../utils/process';
export default async function () {
await ng('cache', 'enable');
if (JSON.parse(await readFile('angular.json')).cli.cache.enabled !== true) {
throw new Error(`Expected 'cli.cache.enable' to be true.`);
}
await ng('ca... | {
"end_byte": 489,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/cache/cache-enable-disable.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/cache/cache-info.ts_0_2517 | import { execAndWaitForOutputToMatch } from '../../../utils/process';
import { updateJsonFile } from '../../../utils/project';
export default async function () {
const originalCIValue = process.env['CI'];
try {
// Should be enabled by default for local builds.
await configureTest('0' /** envCI */);
aw... | {
"end_byte": 2517,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/cache/cache-info.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/cache/cache-clean.ts_0_349 | import { createDir, expectFileNotToExist, expectFileToExist } from '../../../utils/fs';
import { ng } from '../../../utils/process';
export default async function () {
const cachePath = '.angular/cache';
await createDir(cachePath);
await expectFileToExist(cachePath);
await ng('cache', 'clean');
await expect... | {
"end_byte": 349,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/cache/cache-clean.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/config/config-set-serve-port.ts_0_319 | import { expectFileToMatch } from '../../../utils/fs';
import { ng } from '../../../utils/process';
export default function () {
return Promise.resolve()
.then(() => ng('config', 'projects.test-project.architect.serve.options.port', '1234'))
.then(() => expectFileToMatch('angular.json', /"port": 1234/));
}
| {
"end_byte": 319,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/config/config-set-serve-port.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/config/config-set-enum-check.ts_0_504 | import { ng } from '../../../utils/process';
export default async function () {
// These tests require schema querying capabilities
// .then(() => expectToFail(
// () => ng('config', 'schematics.@schematics/angular.component.aaa', 'bbb')),
// )
// .then(() => expectToFail(() => ng(
// 'config',
// ... | {
"end_byte": 504,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/config/config-set-enum-check.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/config/config-set-prefix.ts_0_608 | import { ng } from '../../../utils/process';
import { expectToFail } from '../../../utils/utils';
export default function () {
return Promise.resolve()
.then(() => expectToFail(() => ng('config', 'schematics.@schematics/angular.component.prefix')))
.then(() => ng('config', 'schematics.@schematics/angular.com... | {
"end_byte": 608,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/config/config-set-prefix.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/config/config-global.ts_0_1685 | import { homedir } from 'os';
import * as path from 'path';
import { deleteFile, expectFileToExist } from '../../../utils/fs';
import { ng } from '../../../utils/process';
import { expectToFail } from '../../../utils/utils';
export default async function () {
await expectToFail(() =>
ng('config', '--global', 'sc... | {
"end_byte": 1685,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/config/config-global.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/config/config-set.ts_0_1648 | import { ng, silentNg } from '../../../utils/process';
import { expectToFail } from '../../../utils/utils';
export default async function () {
let ngError: Error;
ngError = await expectToFail(() => silentNg('config', 'cli.warnings.zzzz', 'true'));
if (
!ngError.message.includes(
'Data path "/cli/warni... | {
"end_byte": 1648,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/config/config-set.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/config/config-get.ts_0_1735 | import { ng } from '../../../utils/process';
import { expectToFail } from '../../../utils/utils';
export default async function () {
await expectToFail(() => ng('config', 'schematics.@schematics/angular.component.inlineStyle'));
await ng('config', 'schematics.@schematics/angular.component.inlineStyle', 'false');
... | {
"end_byte": 1735,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/config/config-get.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/config/config-global-validation.ts_0_1881 | import { homedir } from 'os';
import * as path from 'path';
import { deleteFile, expectFileToExist } from '../../../utils/fs';
import { ng, silentNg } from '../../../utils/process';
import { expectToFail } from '../../../utils/utils';
export default async function () {
let ngError: Error;
ngError = await expectTo... | {
"end_byte": 1881,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/config/config-global-validation.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/completion/completion-script.ts_0_1795 | import { exec, execAndWaitForOutputToMatch } from '../../../utils/process';
export default async function () {
// ng build
await execAndWaitForOutputToMatch(
'ng',
['--get-yargs-completions', 'ng', 'b', ''],
/test-project/,
);
await execAndWaitForOutputToMatch(
'ng',
['--get-yargs-completio... | {
"end_byte": 1795,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/completion/completion-script.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/completion/completion-prompt.ts_0_1002 | import { promises as fs } from 'fs';
import * as path from 'path';
import { env } from 'process';
import { getGlobalVariable } from '../../../utils/env';
import { mockHome } from '../../../utils/utils';
import {
execAndCaptureError,
execAndWaitForOutputToMatch,
execWithEnv,
silentNpm,
} from '../../../utils/pr... | {
"end_byte": 1002,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/completion/completion-prompt.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/completion/completion-prompt.ts_1003_8957 | async function () {
// Windows Cmd and Powershell do not support autocompletion. Run a different set of tests to
// confirm autocompletion skips the prompt appropriately.
if (process.platform === 'win32') {
await windowsTests();
return;
}
// Sets up autocompletion after user accepts a prompt from any... | {
"end_byte": 8957,
"start_byte": 1003,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/completion/completion-prompt.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/completion/completion-prompt.ts_8961_13954 | // Does *not* prompt user for CI executions.
{
const { stdout } = await execWithEnv('ng', ['config'], {
...DEFAULT_ENV,
CI: 'true',
NG_FORCE_TTY: undefined,
});
if (AUTOCOMPLETION_PROMPT.test(stdout)) {
throw new Error('CI execution prompted for autocompletion setup but should not... | {
"end_byte": 13954,
"start_byte": 8961,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/completion/completion-prompt.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/completion/completion.ts_0_7563 | import { promises as fs } from 'fs';
import * as path from 'path';
import { getGlobalVariable } from '../../../utils/env';
import { mockHome } from '../../../utils/utils';
import {
execAndCaptureError,
execAndWaitForOutputToMatch,
execWithEnv,
silentNpm,
} from '../../../utils/process';
const testRegistry = ge... | {
"end_byte": 7563,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/completion/completion.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/completion/completion.ts_7566_12162 | await mockHome(async (home) => {
const zshrc = path.join(home, '.zshrc');
await fs.writeFile(zshrc, '# `.zshrc` commands...');
const zshProfile = path.join(home, '.zsh_profile');
await fs.writeFile(zshProfile, '# `.zsh_profile` commands...');
const profile = path.join(home, '.profile');
await fs... | {
"end_byte": 12162,
"start_byte": 7566,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/completion/completion.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/secure-registry.ts_0_1567 | import { expectFileNotToExist, expectFileToExist } from '../../../utils/fs';
import { getActivePackageManager, installWorkspacePackages } from '../../../utils/packages';
import { git, ng } from '../../../utils/process';
import { createNpmConfigForAuthentication } from '../../../utils/registry';
import { expectToFail } ... | {
"end_byte": 1567,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/secure-registry.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/base.ts_0_681 | import { assetDir } from '../../../utils/assets';
import { deleteFile, expectFileToExist, symlinkFile } from '../../../utils/fs';
import { ng } from '../../../utils/process';
import { expectToFail } from '../../../utils/utils';
export default async function () {
await symlinkFile(assetDir('add-collection'), `./node_... | {
"end_byte": 681,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/base.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/add-version.ts_0_436 | import { expectFileToExist, expectFileToMatch, rimraf } from '../../../utils/fs';
import { ng } from '../../../utils/process';
export default async function () {
await ng('add', '@angular-devkit-tests/ng-add-simple@^1.0.0', '--skip-confirmation');
await expectFileToMatch('package.json', /\/ng-add-simple.*\^1\.0\.0... | {
"end_byte": 436,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/add-version.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/yarn-env-vars.ts_0_1074 | import { expectFileNotToExist, expectFileToExist } from '../../../utils/fs';
import { getActivePackageManager } from '../../../utils/packages';
import { git, ng } from '../../../utils/process';
import {
createNpmConfigForAuthentication,
setNpmEnvVarsForAuthentication,
} from '../../../utils/registry';
export defau... | {
"end_byte": 1074,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/yarn-env-vars.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/add-material.ts_0_1313 | import { assertIsError } from '../../../utils/utils';
import { expectFileToMatch, rimraf } from '../../../utils/fs';
import { getActivePackageManager, uninstallPackage } from '../../../utils/packages';
import { ng } from '../../../utils/process';
import { isPrereleaseCli } from '../../../utils/project';
import { append... | {
"end_byte": 1313,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/add-material.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/file.ts_0_312 | import { assetDir } from '../../../utils/assets';
import { expectFileToExist } from '../../../utils/fs';
import { ng } from '../../../utils/process';
export default async function () {
await ng('add', assetDir('add-collection.tgz'), '--name=blah', '--skip-confirmation');
await expectFileToExist('blah');
}
| {
"end_byte": 312,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/file.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/registry-option.ts_0_629 | import { getGlobalVariable } from '../../../utils/env';
import { expectFileToExist } from '../../../utils/fs';
import { ng } from '../../../utils/process';
import { expectToFail } from '../../../utils/utils';
export default async function () {
const testRegistry = getGlobalVariable('package-registry');
// Set an ... | {
"end_byte": 629,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/registry-option.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/peer.ts_0_816 | import { assetDir } from '../../../utils/assets';
import { ng } from '../../../utils/process';
const warning = 'Adding the package may not succeed.';
export default async function () {
const { stdout: bad } = await ng(
'add',
assetDir('add-collection-peer-bad'),
'--skip-confirmation',
);
if (!bad.in... | {
"end_byte": 816,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/peer.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/version-specifier.ts_0_2052 | import { appendFile } from 'fs/promises';
import { expectFileToMatch, rimraf } from '../../../utils/fs';
import { getActivePackageManager, uninstallPackage } from '../../../utils/packages';
import { ng } from '../../../utils/process';
import { isPrereleaseCli } from '../../../utils/project';
export default async funct... | {
"end_byte": 2052,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/version-specifier.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/npm-config.ts_0_285 | import { writeFile } from '../../../utils/fs';
import { ng } from '../../../utils/process';
export default async function () {
// Works with before option
await writeFile('.npmrc', `before=${new Date().toISOString()}`);
await ng('add', '@angular/pwa', '--skip-confirmation');
}
| {
"end_byte": 285,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/npm-config.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/add-pwa.ts_0_2542 | import { getGlobalVariable } from '../../../utils/env';
import { expectFileToExist, readFile, rimraf } from '../../../utils/fs';
import { installWorkspacePackages } from '../../../utils/packages';
import { ng } from '../../../utils/process';
import { updateJsonFile } from '../../../utils/project';
const snapshots = re... | {
"end_byte": 2542,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/add-pwa.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/dir.ts_0_308 | import { assetDir } from '../../../utils/assets';
import { expectFileToExist } from '../../../utils/fs';
import { ng } from '../../../utils/process';
export default async function () {
await ng('add', assetDir('add-collection'), '--name=blah', '--skip-confirmation');
await expectFileToExist('blah');
}
| {
"end_byte": 308,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/dir.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/add/add.ts_0_439 | import { expectFileToExist, expectFileToMatch, rimraf } from '../../../utils/fs';
import { ng } from '../../../utils/process';
export default async function () {
await ng('add', '@angular-devkit-tests/ng-add-simple', '--skip-confirmation');
await expectFileToMatch('package.json', /@angular-devkit-tests\/ng-add-sim... | {
"end_byte": 439,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/add/add.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/serve/ssr-http-requests-assets.ts_0_2641 | import assert from 'node:assert';
import { killAllProcesses, ng } from '../../../utils/process';
import { rimraf, writeMultipleFiles } from '../../../utils/fs';
import { installWorkspacePackages } from '../../../utils/packages';
import { ngServe, useSha } from '../../../utils/project';
export default async function (... | {
"end_byte": 2641,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/serve/ssr-http-requests-assets.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/serve/serve-path.ts_0_790 | import * as assert from 'assert';
import { ngServe } from '../../../utils/project';
export default async function () {
// TODO(architect): Delete this test. It is now in devkit/build-angular.
const port = await ngServe('--serve-path', 'test/');
return Promise.resolve()
.then(() => fetch(`http://localhost:$... | {
"end_byte": 790,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/serve/serve-path.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/serve/assets.ts_0_2281 | import assert from 'node:assert';
import { randomUUID } from 'node:crypto';
import { mkdir, rm, writeFile } from 'node:fs/promises';
import { ngServe, updateJsonFile } from '../../../utils/project';
import { getGlobalVariable } from '../../../utils/env';
export default async function () {
const outsideDirectoryName ... | {
"end_byte": 2281,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/serve/assets.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/serve/head-request.ts_0_828 | import { ngServe } from '../../../utils/project';
export default async function () {
const port = await ngServe();
// HTML
await checkHeadForUrl(`http://localhost:${port}/index.html`);
// Generated JS
await checkHeadForUrl(`http://localhost:${port}/main.js`);
// Generated CSS
await checkHeadForUrl(`http:... | {
"end_byte": 828,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/serve/head-request.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/serve/reload-shims.ts_0_722 | import { prependToFile, writeFile } from '../../../utils/fs';
import { execAndWaitForOutputToMatch } from '../../../utils/process';
export default async function () {
// Simulate a JS library using a Node.js specific module
await writeFile('src/node-usage.js', `const path = require('path');\n`);
await prependToF... | {
"end_byte": 722,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/serve/reload-shims.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/serve/preflight-request.ts_0_476 | import { ngServe } from '../../../utils/project';
export default async function () {
const port = await ngServe();
const result = await fetch(`http://localhost:${port}/main.js`, { method: 'OPTIONS' });
const content = await result.blob();
if (content.size !== 0) {
throw new Error(`Expected "size" to be "0... | {
"end_byte": 476,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/serve/preflight-request.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/e2e/e2e-and-serve.ts_0_228 | import { silentNg } from '../../../utils/process';
import { ngServe } from '../../../utils/project';
export default async function () {
// Should run side-by-side with `ng serve`
await ngServe();
await silentNg('e2e');
}
| {
"end_byte": 228,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/e2e/e2e-and-serve.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/e2e/protractor-config.ts_0_353 | import { moveFile } from '../../../utils/fs';
import { silentNg } from '../../../utils/process';
export default async function () {
// Should accept different config file
await moveFile('./e2e/protractor.conf.js', './e2e/renamed-protractor.conf.js');
await silentNg('e2e', 'test-project', '--protractor-config=e2e... | {
"end_byte": 353,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/e2e/protractor-config.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/e2e/suite.ts_0_478 | import { silentNg } from '../../../utils/process';
import { replaceInFile } from '../../../utils/fs';
export default async function () {
// Suites block need to be added in the protractor.conf.js file to test suites
await replaceInFile(
'e2e/protractor.conf.js',
`allScriptsTimeout: 11000,`,
`allScripts... | {
"end_byte": 478,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/e2e/suite.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/e2e/multiple-specs.ts_0_529 | import { silentNg } from '../../../utils/process';
import { moveFile, copyFile } from '../../../utils/fs';
export default async function () {
// Should accept different multiple spec files
await moveFile('./e2e/src/app.e2e-spec.ts', './e2e/src/renamed-app.e2e-spec.ts');
await copyFile('./e2e/src/renamed-app.e2e-... | {
"end_byte": 529,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/e2e/multiple-specs.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/help/help-hidden.ts_0_546 | import { silentNg } from '../../../utils/process';
export default async function () {
const { stdout: stdoutNew } = await silentNg('--help');
if (/(easter-egg)|(ng make-this-awesome)|(ng init)/.test(stdoutNew)) {
throw new Error(
'Expected to not match "(easter-egg)|(ng make-this-awesome)|(ng init)" in h... | {
"end_byte": 546,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/help/help-hidden.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/help/help-json.ts_0_2933 | import { silentNg } from '../../../utils/process';
export default async function () {
// This test is use as a sanity check.
const addHelpOutputSnapshot = JSON.stringify({
'name': 'config',
'command': 'ng config [json-path] [value]',
'shortDescription':
'Retrieves or sets Angular configuration va... | {
"end_byte": 2933,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/help/help-json.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/analytics/analytics-info.ts_0_1023 | import { execAndWaitForOutputToMatch } from '../../../utils/process';
import { updateJsonFile } from '../../../utils/project';
export default async function () {
// Should be disabled by default.
await configureTest(undefined /** analytics */);
await execAndWaitForOutputToMatch('ng', ['analytics', 'info'], /Effe... | {
"end_byte": 1023,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/analytics/analytics-info.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/analytics/analytics-enable-disable.ts_0_393 | import assert from 'node:assert';
import { readFile } from '../../../utils/fs';
import { ng } from '../../../utils/process';
export default async function () {
await ng('analytics', 'enable');
assert.ok(JSON.parse(await readFile('angular.json')).cli.analytics);
await ng('analytics', 'disable');
assert.strictE... | {
"end_byte": 393,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/analytics/analytics-enable-disable.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/commands/analytics/ask-analytics-command.ts_0_1510 | import { execWithEnv } from '../../../utils/process';
import { mockHome } from '../../../utils/utils';
const ANALYTICS_PROMPT = /Would you like to share pseudonymous usage data/;
export default async function () {
// CLI should prompt for analytics permissions.
await mockHome(async () => {
const { stdout } = ... | {
"end_byte": 1510,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/commands/analytics/ask-analytics-command.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/ts-paths.ts_0_1794 | import { appendToFile, createDir, replaceInFile, rimraf, writeMultipleFiles } from '../../utils/fs';
import { ng } from '../../utils/process';
import { updateTsConfig } from '../../utils/project';
export default async function () {
await updateTsConfig((json) => {
json['compilerOptions']['baseUrl'] = './src';
... | {
"end_byte": 1794,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/ts-paths.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/output-dir.ts_0_1370 | import { getGlobalVariable } from '../../utils/env';
import { expectFileToExist } from '../../utils/fs';
import { expectGitToBeClean } from '../../utils/git';
import { ng } from '../../utils/process';
import { updateJsonFile } from '../../utils/project';
import { expectToFail } from '../../utils/utils';
export default... | {
"end_byte": 1370,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/output-dir.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/sourcemap.ts_0_1928 | import * as fs from 'fs';
import { expectFileToExist } from '../../utils/fs';
import { ng } from '../../utils/process';
import { getGlobalVariable } from '../../utils/env';
export default async function () {
const useWebpackBuilder = !getGlobalVariable('argv')['esbuild'];
// The below is needed to cache bundles a... | {
"end_byte": 1928,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/sourcemap.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/ts-standard-decorators.ts_0_1155 | import { getGlobalVariable } from '../../utils/env';
import { ng } from '../../utils/process';
import { updateJsonFile, updateTsConfig } from '../../utils/project';
export default async function () {
// Update project to disable experimental decorators
await updateTsConfig((json) => {
json['compilerOptions']['... | {
"end_byte": 1155,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/ts-standard-decorators.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/library-with-demo-app.ts_0_1738 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import { appendToFile, createDir, writeFile } from '../../utils/fs';
import { ng } from '../../utils/process';
impor... | {
"end_byte": 1738,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/library-with-demo-app.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/poll.ts_0_1185 | import { setTimeout } from 'node:timers/promises';
import { getGlobalVariable } from '../../utils/env';
import { appendToFile } from '../../utils/fs';
import { waitForAnyProcessOutputToMatch } from '../../utils/process';
import { ngServe } from '../../utils/project';
import { expectToFail } from '../../utils/utils';
c... | {
"end_byte": 1185,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/poll.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/disk-cache-purge.ts_0_950 | import { join } from 'path';
import { createDir, expectFileNotToExist, expectFileToExist, writeFile } from '../../utils/fs';
import { silentNg } from '../../utils/process';
import { updateJsonFile } from '../../utils/project';
export default async function () {
const cachePath = '.angular/cache';
const staleCacheP... | {
"end_byte": 950,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/disk-cache-purge.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/chunk-optimizer.ts_0_664 | import assert from 'node:assert/strict';
import { readFile } from 'node:fs/promises';
import { execWithEnv } from '../../utils/process';
/**
* AOT builds with chunk optimizer should contain generated component definitions.
* This is currently testing that the generated code is propagating through the
* chunk optimi... | {
"end_byte": 664,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/chunk-optimizer.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/rebuild-replacements.ts_0_1401 | import { getGlobalVariable } from '../../utils/env';
import { appendToFile, createDir, writeMultipleFiles } from '../../utils/fs';
import { waitForAnyProcessOutputToMatch } from '../../utils/process';
import { ngServe, updateJsonFile } from '../../utils/project';
const webpackGoodRegEx = getGlobalVariable('argv')['esb... | {
"end_byte": 1401,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/rebuild-replacements.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/rebuild-symlink.ts_0_1409 | import { symlink } from 'fs/promises';
import { resolve } from 'path';
import { appendToFile, expectFileToMatch, writeMultipleFiles } from '../../utils/fs';
import { execAndWaitForOutputToMatch, waitForAnyProcessOutputToMatch } from '../../utils/process';
import { updateJsonFile } from '../../utils/project';
import { g... | {
"end_byte": 1409,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/rebuild-symlink.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/esbuild-unsupported.ts_0_536 | import { join } from 'path';
import { execWithEnv } from '../../utils/process';
export default async function () {
// TODO(bazel): fails with bazel on windows
if (process.platform.startsWith('win')) {
return;
}
// Set the esbuild native binary path to a non-existent file to simulate a spawn error.
// Th... | {
"end_byte": 536,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/esbuild-unsupported.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/assets.ts_0_1848 | import * as fs from 'fs';
import { expectFileToExist, expectFileToMatch, writeFile } from '../../utils/fs';
import { ng } from '../../utils/process';
import { updateJsonFile } from '../../utils/project';
import { expectToFail } from '../../utils/utils';
export default async function () {
await writeFile('public/.fil... | {
"end_byte": 1848,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/assets.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/disk-cache.ts_0_1811 | import { expectFileNotToExist, expectFileToExist, rimraf, writeFile } from '../../utils/fs';
import { silentNg } from '../../utils/process';
import { updateJsonFile } from '../../utils/project';
const defaultCachePath = '.angular/cache';
const overriddenCachePath = '.cache/angular-cli';
export default async function ... | {
"end_byte": 1811,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/disk-cache.ts"
} |
angular-cli/tests/legacy-cli/e2e/tests/build/css-urls.ts_0_7116 | import { ng } from '../../utils/process';
import {
expectFileToMatch,
expectFileToExist,
expectFileMatchToExist,
writeMultipleFiles,
} from '../../utils/fs';
import { copyProjectAsset } from '../../utils/assets';
import { expectToFail } from '../../utils/utils';
import { getGlobalVariable } from '../../utils/en... | {
"end_byte": 7116,
"start_byte": 0,
"url": "https://github.com/angular/angular-cli/blob/main/tests/legacy-cli/e2e/tests/build/css-urls.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.