Skip to content

Conversation

@Romu-C
Copy link
Contributor

@Romu-C Romu-C commented May 20, 2025

Description

Update mock provider. Remove the old unsued one (renderWithRouter) which is replace by the mockedProvider.

Type of change

Please check options that are relevant.

  • Chore (PATCH)
  • Doc (PATCH)
  • Bug fix (PATCH)
  • New feature (MINOR)
  • Breaking change (MAJOR)

PATCH: refactor, internal or non-breaking change which fixes an issue

MINOR: non-breaking change which adds functionality

MAJOR: fix or feature that would cause existing functionality to not work as expected

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

@Romu-C Romu-C requested review from Copilot and evanthonyly May 20, 2025 08:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request updates the mock provider setup for tests by replacing the old renderWithRouter file with a new mockedProvider component integrated into a revised custom render function.

  • Removed the deprecated renderWithRouter file.
  • Added a new MockedProviders component to encapsulate required providers.
  • Refactored the customRender function to support routing via an optional path property.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
frontend/src/mocks/setup.ts Refactored test setup to remove the old Providers and integrate MockedProviders.
frontend/src/mocks/renderWithRouter.tsx Removed the redundant renderWithRouter file.
frontend/src/mocks/mockedProvider.tsx Introduced a new mocked provider component to replace the old unsued provider.
Files not reviewed (1)
  • frontend/tsconfig.app.json: Language not supported
Comments suppressed due to low confidence (1)

frontend/src/mocks/setup.ts:46

  • [nitpick] The variable 'wrapper' is used to represent a provider component, but its naming may be ambiguous. Consider renaming it to 'MockedWrapper' or similar to clearly indicate its purpose.
export const wrapper = MockedProviders;

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.

3 participants