Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JUG-11 Add custom response definition #31

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

datalek
Copy link
Contributor

@datalek datalek commented Jun 22, 2023

List of Changes

  • Replace MockRequest and MockOutput with HttpRequest and HttpResponse
  • Add CustomResponseDefinition

Motivation and Context

The system shall allow the user to define customized responses for a given request. This PR adds the code that manages the fallback between the user-defined response and the mock's random response.

How Has This Been Tested?

Unit test.

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@datalek datalek changed the title Add custom response definition JUG-11 Add custom response definition Jun 22, 2023
@datalek datalek marked this pull request as ready for review June 22, 2023 17:25
@datalek datalek requested a review from kin0992 as a code owner June 22, 2023 17:25
@changeset-bot
Copy link

changeset-bot bot commented Jun 23, 2023

⚠️ No Changeset found

Latest commit: 7a4b77e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

src/useCases/__tests__/processRequest.test.ts Outdated Show resolved Hide resolved
src/useCases/processRequest.ts Outdated Show resolved Hide resolved
@datalek datalek requested a review from kin0992 August 10, 2023 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants