Skip to content

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

@Yicong-Huang

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions