Skip to content

fix(@angular/build): enable unit-test builder watch outside CI #30323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/angular/build/src/builders/unit-test/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { type BuilderContext, targetFromTargetString } from '@angular-devkit/arc
import path from 'node:path';
import { normalizeCacheOptions } from '../../utils/normalize-cache';
import { getProjectRootPaths } from '../../utils/project-metadata';
import { isTTY } from '../../utils/tty';
import type { Schema as UnitTestOptions } from './schema';

export type NormalizedUnitTestOptions = Awaited<ReturnType<typeof normalizeOptions>>;
Expand All @@ -32,8 +33,7 @@ export async function normalizeOptions(
const buildTargetSpecifier = options.buildTarget ?? `::development`;
const buildTarget = targetFromTargetString(buildTargetSpecifier, projectName, 'build');

const { codeCoverage, codeCoverageExclude, tsConfig, runner, reporters, browsers, watch } =
options;
const { codeCoverage, codeCoverageExclude, tsConfig, runner, reporters, browsers } = options;

return {
// Project/workspace information
Expand All @@ -51,7 +51,7 @@ export async function normalizeOptions(
tsConfig,
reporters,
browsers,
watch,
watch: options.watch ?? isTTY(),
debug: options.debug ?? false,
providersFile: options.providersFile && path.join(workspaceRoot, options.providersFile),
};
Expand Down