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

mockService property no longer set #1250

Open
TimothyJones opened this issue Nov 17, 2024 · 0 comments
Open

mockService property no longer set #1250

TimothyJones opened this issue Nov 17, 2024 · 0 comments
Labels
bug Indicates an unexpected problem or unintended behavior triage This issue is yet to be triaged by a maintainer

Comments

@TimothyJones
Copy link
Contributor

TimothyJones commented Nov 17, 2024

This is probably a documentation bug.

Migrating some old code from 9.18.1 to 13.1.5 following the migration guides here and here resulted in broken tests.

The problem seems to be that the returned object no longer has the mockService property, so I can't get the running url from provider.mockService.baseUrl.

This meant my tests needed to be changed:

  • to use new PactV3() instead of new Pact
  • to use the provider.executeTest((mockService) => form
  • The corresponding provider.mockService.baseUrl changed to mockService.url

Expected:

Following the migration guide to result in working tests

Actual:

Following the migration guide resulted in broken tests due to provider.mockService being undefined.

@TimothyJones TimothyJones added bug Indicates an unexpected problem or unintended behavior triage This issue is yet to be triaged by a maintainer labels Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior triage This issue is yet to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant