Meta tags:
description= Command test Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description When running unit tests for a library with @angular/build:unit-...;
Headings (most frequently used words):
navigation, coverage, in, library, not, description, metadata, footer, this, the, was, behavior, unit, test, includes, dependent, files, and, does, reduce, runtime, when, using, include, 33484, menu, repository, activity, issue, actions, command, is, regression, previous, version, which, bug, present, minimal, reproduction, observed, your, environment, anything, else, relevant, nagahara, naoki, commented, on, nov, 2026, what, checked, question, about, intended, assignees, labels, type, projects, milestone, relationships, development, performance,
Text of the page (most frequently used words):
angular (35), lib (34), the (33), #coverage (31), and (19), test (18), build (17), library (16), github (14), this (11), unit (11), for (11), not (10), with (10), issue (9), #include (9), from (9), 2026 (8), that (7), cli (7), ___ (7), projects (6), code (6), libraries (6), import (6), triaged (6), gemini (6), files (6), when (6), security (5), copilot (5), actions (5), development (5), sign (5), tested (5), report (5), dependent (5), behavior (5), using (5), includes (5), does (5), reduce (5), your (5), tests (5), you (4), configuration (4), scope (4), performance (4), workspace (4), label (4), noting (4), has (4), been (4), jun (4), runtime (4), version (4), environment (4), support (4), time (3), navigation (3), open (3), needstriage (3), milestone (3), area (3), one (3), have (3), intended (3), default (3), would (3), small (3), two (3), restricting (3), only (3), repository (3), json (3), src (3), run (3), generated (3), libb (3), component (3), vitest (3), added (3), platform (3), duration (3), transform (3), setup (3), execution (3), copy (3), link (3), 33484 (3), quality (3), another (3), tab (3), window (3), refresh (3), session (3), reload (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), all (3), can (2), community (2), status (2), footer (2), pull (2), requests (2), yet (2), type (2), labels (2), metadata (2), project (2), executed (2), being (2), about (2), example (2), each (2), checked (2), latest (2), watch (2), false (2), reporters (2), single (2), but (2), contains (2), liba (2), template (2), core (2), what (2), node (2), more (2), nov (2), nagahara (2), naoki (2), carlosamouco (2), robot (2), response (2), ____ (2), package (2), compiler (2), browser (2), 85s (2), 24s (2), production (2), times (2), depends (2), other (2), used (2), add (2), which (2), description (2), previous (2), was (2), work (2), new (2), insights (2), 196 (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), learn (2), business (2), fixes (2), products (2), secret (2), perform, action, share, personal, information, manage, cookies, contact, docs, privacy, terms, inc, app, branches, none, relationships, due, date, assigned, assignees, comment, already, account, join, conversation, free, local, possible, direction, derive, pattern, while, preserving, explicit, runner, overrides, address, concern, still, need, separate, investigation, coverageinclude, sourceroot, expected, should, limited, since, wanted, clarify, whether, before, proposing, change, question, reproduced, substantial, slowdown, three, runs, per, took, roughly, seconds, clear, improvement, smoke, comparison, benchmark, also, release, main, explicitly, excludes, passes, both, final, class, export, imports, selector, render, keeping, path, mapping, dist, generate, schematic, thanks, reporting, tried, could, reproduce, macos, arm64, jsdom, contributor, commented, removed, jul, hawkgs, changed, title, degradation, enabling, activity, anything, else, relevant, _____, manager, npm, operating, system, linux, x64, installed, requested, animations, common, forms, localize, dynamic, router, service, worker, packagr, rxjs, typescript, zone, 201, 20s, 83s, 09s, 25s, 00s, 154, 60s, 135, 76s, 58s, 90s, 94s, 28s, 91s, 982ms, 89s, without, below, are, inside, larger, monorepo, where, same, vary, depending, changes, noticeably, even, though, observed, enabled, make, depend, create, minimal, reproduction, although, restricted, remains, unchanged, running, unexpected, bug, present, yes, regression, command, body, opened, items, issues, message, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, event, talks, workshops, next, partners, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, ons, trust, why, evaluate, see, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, hosting, review, collaboration, menu, skip, content,
Text of the page (random words):
coverage in library unit test includes dependent library files and does not reduce runtime when using coverage include issue 33484 angular angular cli github skip to content navigation menu sign in products platform github repository hosting code review and collaboration copilot ai coding agent for tasks projects and automated work build ship actions ci cd and automation code quality quality analysis fixes and enforcement codespaces cloud development environments secure code security vulnerability detection and remediation secret protection secret scanning and leak prevention all features developers learn documentation training certifications build build with copilot customize copilot integrations explore trending repos github sponsors developer articles changelog changelog your source for the latest features improvements and fixes across github products all in one place businesses by stage enterprises team startups nonprofits by industry healthcare financial services manufacturing government see all industries evaluate github why github customer stories business insights trust center add ons github advanced security enterprise grade code security copilot for business enterprise grade ai features premium support enterprise grade 24 7 support resources learn connect documentation resource center blog events webinars community forum customer stories integrations support customer support training github status company about partners changelog github universe github universe the event for developers by developers talks workshops and what s next for github pricing search sign in sign up appearance settings you signed in with another tab or window reload to refresh your session you signed out in another tab or window reload to refresh your session you switched accounts on another tab or window reload to refresh your session dismiss alert message angular angular cli repository navigation code issues 196 196 pull requests 20 20 actions security and quality 8 8 insights more items coverage in library unit test includes dependent library files and does not reduce runtime when using coverage include 33484 new issue copy link new issue copy link open open coverage in library unit test includes dependent library files and does not reduce runtime when using coverage include 33484 copy link labels angular build unit test area angular build milestone needstriage description carlosamouco opened on jun 30 2026 issue body actions command test is this a regression yes this behavior used to work in the previous version the previous version in which this bug was not present was no response description when running unit tests for a library with angular build unit test the coverage report includes files from other workspace libraries that the tested library depends on which is unexpected although this can be restricted with coverage include coverage execution time remains unchanged minimal reproduction create two angular libraries in the workspace e g lib a and lib b make lib a depend on lib b add a unit test in lib a run tests with coverage enabled ng test lib a coverage observed behavior the coverage report contains files from lib b even though only lib a is being tested restricting coverage include changes the generated report but does not noticeably reduce execution time performance times below are for a single library test run inside a larger angular monorepo where the tested library depends on 7 other libraries from the same workspace execution times vary depending on configuration development vs production used to build each of the libraries without coverage duration 24 94s transform 62 28s setup 6 91s import 98 85s tests 982ms environment 13 89s with coverage production build duration 154 60s transform 78 24s setup 13 24s import 135 76s tests 1 58s environment 19 90s with coverage development build duration 201 20s transform 57 83s setup 10 09s import 99 85s tests 1 25s environment 15 00s your environment _ _ ____ _ ___ _ __ __ _ _ _ __ _ _ __ ___ _ _ _ _ _ __ ___ _ _ _ ___ ___ _ _ _ _ __ __ _ _ __ _ _ ____ _____ ___ ___ angular cli 22 0 4 angular 22 0 4 node js 24 16 0 package manager npm 11 13 0 operating system linux x64 package installed version requested version angular animations 22 0 4 22 0 4 angular build 22 0 4 22 0 4 angular cli 22 0 4 22 0 4 angular common 22 0 4 22 0 4 angular compiler 22 0 4 22 0 4 angular compiler cli 22 0 4 22 0 4 angular core 22 0 4 22 0 4 angular forms 22 0 4 22 0 4 angular localize 22 0 4 22 0 4 angular platform browser 22 0 4 22 0 4 angular platform browser dynamic 22 0 4 22 0 4 angular router 22 0 4 22 0 4 angular service worker 22 0 4 22 0 4 ng packagr 22 0 0 22 0 0 rxjs 7 8 2 7 8 2 typescript 6 0 3 6 0 3 vitest 4 1 9 4 1 9 zone js 0 16 2 0 16 2 anything else relevant no response activity angular robot added area angular build gemini triaged label noting that an issue has been triaged by gemini label noting that an issue has been triaged by gemini on jun 30 2026 angular robot added this to the needstriage milestone on jun 30 2026 carlosamouco changed the title unit test performance degradation when enabling coverage for angular libraries coverage in library unit test includes dependent library files and does not reduce runtime when using coverage include on jun 30 2026 hawkgs added angular build unit test and removed gemini triaged label noting that an issue has been triaged by gemini label noting that an issue has been triaged by gemini on jul 1 2026 nagahara naoki commented on nov 8 2026 nagahara naoki on nov 8 2026 contributor more actions thanks for reporting this i tried a small two library example and could reproduce the report scope behavior with angular cli angular build 22 0 4 and vitest vitest coverage v8 4 1 9 node 24 22 2 macos arm64 jsdom what i checked generate lib a and lib b using the angular cli library schematic build lib b with ng build lib b configuration development keeping the generated lib b path mapping to dist lib b import libb from lib b in the liba component and render it in the template import component from angular core import libb from lib b component selector lib lib a imports libb template lib lib b export class liba run only the generated lib a test ng test lib a watch false coverage coverage reporters json the single lib a test passes but coverage lib a coverage final json contains both projects lib a src lib lib a ts projects lib b src lib lib b ts explicitly restricting the coverage scope excludes lib b ng test lib a watch false coverage coverage reporters json coverage include projects lib a src ts i have not reproduced the substantial slowdown in this small example three runs per configuration took roughly two seconds each with no clear improvement from restricting coverage this is only a small smoke comparison not a performance benchmark i also have not yet checked the latest release or repository main question about the intended behavior is the default coverage scope for a library expected to include executed code from dependent workspace libraries or should it be limited to the library being tested since lib b is executed by the test i wanted to clarify whether this is intended behavior before proposing a change if the intended default is project local coverage one possible direction would be to derive the default include pattern from the tested project s sourceroot while preserving explicit coverageinclude runner configuration overrides that would address the report scope the performance concern would still need separate investigation sign up for free to join this conversation on github already have an account sign in to comment metadata metadata assignees no one assigned labels angular build unit test area angular build type no type projects no projects milestone needstriage no due date relationships none yet development no branches or pull requests issue actions open in github copilot app footer 2026 github inc footer navigation terms privacy security status community docs contact manage cookies do not share my personal information you can t perform that action at this time
|