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.
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
mockServiceproperty, so I can't get the running url fromprovider.mockService.baseUrl.This meant my tests needed to be changed:
new PactV3()instead ofnew Pactprovider.executeTest((mockService) =>formprovider.mockService.baseUrlchanged tomockService.urlExpected:
Following the migration guide to result in working tests
Actual:
Following the migration guide resulted in broken tests due to
provider.mockServicebeing undefined.