Meta tags:
description= Command e2e, generate 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 a spec uses Jasmine s done callback inside an asy...;
Headings (most frequently used words):
navigation, description, metadata, footer, this, was, refactor, jasmine, vitest, removes, done, from, asynchronous, callbacks, so, migrated, tests, no, longer, wait, for, them, 34730, menu, repository, activity, issue, actions, command, is, regression, the, previous, version, in, which, bug, not, present, minimal, reproduction, exception, or, error, your, environment, anything, else, relevant, assignees, labels, type, projects, milestone, relationships, development,
Text of the page (most frequently used words):
the (46), done (29), github (14), for (14), test (14), data (14), #angular (13), #jasmine (13), and (13), with (11), this (10), vitest (8), callback (8), not (7), async (7), ___ (7), fails (7), refactor (6), never (6), subscribe (6), you (5), security (5), copilot (5), issue (5), schematics (5), sign (5), body (5), nested (5), your (5), emits (5), new (5), inside (5), migrated (5), longer (5), asynchronous (5), code (5), 2026 (4), actions (4), then (4), cli (4), next (4), version (4), spec (4), when (4), timeout (4), function (4), from (4), all (4), support (4), navigation (3), open (3), app (3), needstriage (3), milestone (3), projects (3), area (3), nov (3), before (3), any (3), whose (3), unhandled (3), usage (3), expected (3), toequal (3), expect (3), getdata (3), service (3), promise (3), loaded (3), are (3), event (3), work (3), copy (3), link (3), 34730 (3), removes (3), callbacks (3), tests (3), wait (3), them (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), build (3), that (2), community (2), status (2), footer (2), pull (2), requests (2), development (2), type (2), labels (2), one (2), metadata (2), added (2), robot (2), first (2), case (2), behavior (2), settimeout (2), transformers (2), statement (2), anything (2), ____ (2), package (2), error (2), arrives (2), generate (2), run (2), karma (2), after (2), ever (2), under (2), subject (2), repro (2), schematic (2), migration (2), place (2), handled (2), which (2), does (2), catch (2), await (2), assertion (2), failure (2), throws (2), passes (2), emission (2), about (2), description (2), previous (2), was (2), insights (2), 196 (2), repository (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), can, perform, action, time, share, personal, information, manage, cookies, contact, docs, privacy, terms, inc, branches, none, yet, relationships, due, date, assigned, assignees, comment, already, have, account, join, conversation, free, activity, browser, specific, current, output, asserted, removed, wanted, raise, proposing, change, lifecycle_spec, visitor, recurses, into, functions, replaces, empty, marks, transformdonecallback, packages, lifecycle, else, relevant, _____, node, manager, yarn, operating, system, darwin, arm64, installed, requested, environment, exception, becomes, runner, reports, passing, builder, did, complete, within, 5000ms, nothing, number, const, describe, rxjs, import, replace, fires, src, defaults, minimal, reproduction, alternatively, could, leave, unchanged, todo, like, whenever, referenced, happy, send, whichever, direction, prefer, void, since, has, faithful, would, wrap, awaited, resolver, takes, transformation, correct, top, level, explicitly, forms, rewritten, problem, only, transformer, cannot, existing, safety, check, because, removing, counts, fail, fire, later, outside, depending, timing, surfaces, unattributed, ends, instead, failing, attribution, called, instantly, happened, bugs, caught, completion, guarantee, two, guarantees, lost, once, unconditionally, synchronous, observable, uses, listener, deletes, call, converts, plain, resolves, immediately, runs, waits, asserts, response, bug, present, yes, used, regression, e2e, command, opened, meakib, more, items, issues, message, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, talks, workshops, what, partners, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, add, ons, trust, why, evaluate, see, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, latest, improvements, across, 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, platform, menu, skip, content,
Text of the page (random words):
refactor jasmine vitest removes done from asynchronous callbacks so migrated tests no longer wait for them issue 34730 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 refactor jasmine vitest removes done from asynchronous callbacks so migrated tests no longer wait for them 34730 new issue copy link new issue copy link open open refactor jasmine vitest removes done from asynchronous callbacks so migrated tests no longer wait for them 34730 copy link labels area schematics angular milestone needstriage description meakib opened on nov 16 2026 issue body actions command e2e generate 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 a spec uses jasmine s done callback inside an asynchronous callback subscribe settimeout an event listener the refactor jasmine vitest schematic deletes the done call and converts the test to a plain async function the migrated test then resolves immediately before the callback ever runs so it no longer waits for or asserts anything about the asynchronous work before fails under jasmine if the observable never emits done timeout fails if the assertion inside the callback throws it emits the loaded data done service getdata subscribe data expect data toequal expected done after migration passes unconditionally if the emission is not synchronous it emits the loaded data async service getdata subscribe data expect data toequal expected two guarantees are lost at once the completion guarantee in jasmine a test whose done is never called fails with a timeout the migrated test passes instantly so the event emission never happened bugs are no longer caught failure attribution if the callback does fire later an assertion failure inside it throws outside any test depending on timing it surfaces as an unattributed unhandled error or not at all when the run ends first instead of failing this test the transformation is correct for done at the top level of the test body and for the explicitly handled promise forms then done then done catch done fail which are rewritten to await the problem is only done inside a nested function that the transformer cannot await the existing safety check unhandled done usage does not catch this because removing the nested done counts as a handled usage since vitest has no done callback a faithful migration for the nested case would wrap the body in an awaited promise whose resolver takes done s place it emits the loaded data new promise void done service getdata subscribe data expect data toequal expected done alternatively the schematic could leave the test unchanged with a todo like unhandled done usage whenever done is referenced inside a nested function happy to send a pr for whichever direction you prefer minimal reproduction ng new repro defaults cd repro replace the body of src app app spec ts or any spec with a test whose callback never fires import subject from rxjs describe done in async callback it fails when the data never arrives done const data new subject number data subscribe done nothing ever emits under jasmine this test fails with a done timeout run it with karma jasmine ng test with the karma builder the test fails after the timeout async function did not complete within 5000ms ng generate schematics angular refactor jasmine vitest the spec becomes it fails when the data never arrives async data subscribe and ng test vitest runner reports it as passing exception or error your environment _ _ ____ _ ___ _ __ __ _ _ _ __ _ _ __ ___ _ _ _ _ _ __ ___ _ _ _ ___ ___ _ _ _ _ __ __ _ _ __ _ _ ____ _____ ___ ___ angular cli 22 3 0 next 5 node js 24 15 0 package manager yarn 1 22 22 operating system darwin arm64 package installed version requested version angular cli 22 3 0 next 5 22 3 0 next 5 anything else relevant packages schematics angular refactor jasmine vitest transformers jasmine lifecycle ts transformdonecallback the body visitor recurses into nested functions and replaces any done statement with an empty statement then marks the test async the current output is asserted by the first case in transformers jasmine lifecycle_spec ts settimeout with done async with done removed so i wanted to raise this before proposing a behavior change not os or browser specific activity angular robot added area schematics angular on nov 16 2026 angular robot added this to the needstriage milestone on nov 16 2026 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 area schematics angular 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
|