Skip to content

Resolve Jasmine→Vitest migration TODOs blocking build-and-test-dev-image - #3

Closed
bastianjoel wants to merge 12 commits into
mainfrom
angular-22
Closed

Resolve Jasmine→Vitest migration TODOs blocking build-and-test-dev-image#3
bastianjoel wants to merge 12 commits into
mainfrom
angular-22

Conversation

@bastianjoel

@bastianjoel bastianjoel commented Jul 9, 2026

Copy link
Copy Markdown
Owner

build-and-test-dev-image was failing in Karma compile due to unresolved Jasmine migration artifacts from jasmine-vitest-20260709T135139738Z.md (expectAsync(...).toBePending() and jasmine.createSpyObj(...)). This PR replaces those TODO-backed patterns with Vitest-compatible equivalents in the affected specs.

  • Pending-promise assertions migrated

    • Added a local expectToBePending helper (Promise.race-based) in each affected spec and replaced all expectAsync(...).toBePending() usages.
    • Updated:
      • src/app/infrastructure/utils/promises/deferred.spec.ts
      • src/app/infrastructure/utils/promises/mutex.spec.ts
      • src/app/site/pages/meetings/services/main-menu.service.spec.ts
      • src/app/ui/modules/list/services/list-search.service.spec.ts
      • src/app/worker/http/http-stream.spec.ts
      • src/app/worker/http/http-subscription-polling.spec.ts
      • src/app/worker/http/http-subscription-sse.spec.ts
  • Jasmine spy-object leftovers removed

    • Replaced jasmine.createSpyObj dynamic-variable TODOs with explicit Vitest mocks (vi.fn) in:
      • src/app/site/services/theme.service.spec.ts
    • Preserved existing test intent (constructor calls, observable/promise behavior) with typed stub providers.
  • Representative migration pattern

async function expectToBePending(promise: PromiseLike<unknown>): Promise<void> {
    const pendingMarker = Symbol(`pending`);
    const state = await Promise.race([
        promise.then(
            () => `settled`,
            () => `settled`
        ),
        Promise.resolve(pendingMarker)
    ]);
    expect(state).toBe(pendingMarker);
}

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Coverage Report for ./packages/openslides-motion-diff

Status Category Percentage Covered / Total
🔵 Lines 94.09% 1226 / 1303
🔵 Statements 94.11% 1263 / 1342
🔵 Functions 90% 144 / 160
🔵 Branches 89.85% 700 / 779
File CoverageNo changed files found.
Generated in workflow #3 for commit 99f00b2 by the Vitest Coverage Report Action

Copilot AI changed the title Angular 22 Resolve Jasmine→Vitest migration TODOs blocking build-and-test-dev-image Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant