Skip to content

tienvx/test-from-provider-state-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test ProviderState Generator

This is a demo project for this bug

Usage

Commands to run:

yarn install
yarn test # Test should pass, but failed (as expected, a bug)

Explain

See Slack discussion

The idea is: fromProviderState use 'pact:matcher:type': 'type', so it only compare the type of 2 values when it's comparing 2 values.

If we use it in path, we will have the issue this project is trying to show.

pact.addInteraction({
    withRequest: {
        method: 'GET',
        path: fromProviderState('${iri}', '/api/users/14f6626f-c51e-4311-ac52-182c8f2a7634')
    }
});

Here is the log:

DEBUG tokio-runtime-worker pact_matching::matchers: String -> String: comparing '/api/users/14f6626f-c51e-4311-ac52-182c8f2a7634' to '/any' ==> true cascaded=false matcher=Type

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published