Skip to content

Commit

Permalink
chore(docs): use full path for message images
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F authored Aug 24, 2023
1 parent f0825e3 commit 7c239c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Pact is a consumer-driven contract testing tool, which is a fancy way of saying

The process looks like this on the consumer side:

![diagram](./diagrams/message-consumer.png)
![diagram](https://github.com/pact-foundation/pact-js/blob/master/docs/diagrams/message-consumer.png)

The process looks like this on the provider (producer) side:

![diagram](./diagrams/message-provider.png)
![diagram](https://github.com/pact-foundation/pact-js/blob/master/docs/diagrams/message-provider.png)

1. The consumer writes a unit test of its behaviour using a Mock provided by Pact
1. Pact writes the interactions into a contract file (as a JSON document)
Expand Down Expand Up @@ -156,4 +156,4 @@ describe("Message provider tests", () => {
1. Our API producer contains a single function `createDog` which is responsible for generating the message that will be sent to the consumer via some message queue
1. We configure Pact to stand-in for the queue. The most important bit here is the `messageProviders` block
- Similar to the Consumer tests, we map the various interactions that are going to be verified as denoted by their `description` field. In this case, `a request for a dog`, maps to the `createDog` handler. Notice how this matches the original Consumer test. We are using the `providerWithMetadata` function because we are also going to validate message metadata (in this case, the queue the message will be sent on)
1. We can now run the verification process. Pact will read all of the interactions specified by its consumer, and invoke each function that is responsible for generating that message.
1. We can now run the verification process. Pact will read all of the interactions specified by its consumer, and invoke each function that is responsible for generating that message.

0 comments on commit 7c239c2

Please sign in to comment.