Skip to content

Add an ESLint rule that forbids the real HttpClient in frontend specs #5184

Closed

Description

@Yicong-Huang

Task Summary

The repo has just been swept clean of specs that wire the real HttpClient instead of HttpClientTestingModule. To stop the pattern from creeping back, add an ESLint override in frontend/.eslintrc.json that fires on *.spec.ts files and forbids importing HttpClient or HttpClientModule from @angular/common/http. The error message should redirect contributors to HttpClientTestingModule from @angular/common/http/testing, which is the convention documented in frontend/TESTING.md.

Task Type

  • Testing / QA

Activity

  1. added a commit that references this issue on May 24, 2026
    cfc6d9a
  2. added a commit that references this issue on Jun 22, 2026
    7170921
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions