Skip to content

Commit

Permalink
fix: fromProviderState should accept any valid JSON. Fixes #696
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Jun 23, 2021
1 parent 3fd8ef4 commit 1b03b2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/v3/matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,18 +436,18 @@ export function arrayContaining(
};
}

export interface ProviderStateInjectedValue extends Matcher<string> {
export interface ProviderStateInjectedValue extends Matcher<AnyJson> {
expression: string;
}

/**
* Marks a item as to be injected from the provider state
* Marks an item to be injected from the provider state
* @param expression Expression to lookup in the provider state context
* @param exampleValue Example value to use in the consumer test
*/
export function fromProviderState(
expression: string,
exampleValue: string
exampleValue: AnyJson
): ProviderStateInjectedValue {
return {
'pact:matcher:type': 'type',
Expand Down

0 comments on commit 1b03b2d

Please sign in to comment.