WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Lint the entire code base of "missing mock cleanup" errors #4944

@palisadoes

Description

@palisadoes

Is your feature request related to a problem? Please describe.

  1. For overall code health we need to lint the entire code base for this type of error
  2. This will make it easier for us to merge the develop branch into main on a regular basis

How to reproduce the error

Run this command:

pnpm exec eslint

Describe the solution you'd like

  1. Lint for the offending error
  2. Update the code base so that the error is fixed without suppressing the error
  3. All tests must pass and be valid
  4. Test code coverage levels must be maintained or improved
  5. No functionality must be affected
  6. Refactor the code if necessary

Additional context

/home/peter/code/GitHub/PalisadoesFoundation/talawa-admin/src/components/UserPortal/CommentCard/CommentCard.spec.tsx
  1:1  error  afterEach block exists but is missing mock cleanup. Add vi.clearAllMocks() or vi.restoreAllMocks()  vitest-isolation/require-aftereach-cleanup

/home/peter/code/GitHub/PalisadoesFoundation/talawa-admin/src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.spec.tsx
  1:1  error  afterEach block exists but is missing mock cleanup. Add vi.clearAllMocks() or vi.restoreAllMocks()  vitest-isolation/require-aftereach-cleanup

/home/peter/code/GitHub/PalisadoesFoundation/talawa-admin/src/components/Venues/Modal/VenueModal.spec.tsx
  1:1  error  afterEach block exists but is missing mock cleanup. Add vi.clearAllMocks() or vi.restoreAllMocks()  vitest-isolation/require-aftereach-cleanup

/home/peter/code/GitHub/PalisadoesFoundation/talawa-admin/src/screens/FundCampaignPledge/FundCampaignPledge.spec.tsx
  1:1  error  afterEach block exists but is missing mock cleanup. Add vi.clearAllMocks() or vi.restoreAllMocks()  vitest-isolation/require-aftereach-cleanup

/home/peter/code/GitHub/PalisadoesFoundation/talawa-admin/src/screens/Leaderboard/Leaderboard.spec.tsx
  1:1  error  afterEach block exists but is missing mock cleanup. Add vi.clearAllMocks() or vi.restoreAllMocks()  vitest-isolation/require-aftereach-cleanup

Metadata

Metadata

Labels

cleanupRemove non-functional or unnecessary codefeature requestgood first issueGood for newcomersrefactorRefactor the code to improve its qualitytestTesting application

Type

No type

Projects

Status

Backlog

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions