Skip to content

Commit 2c14462

Browse files
author
Github Action
committed
chore: synced pact-js docs
1 parent 249ecff commit 2c14462

8 files changed

Lines changed: 9 additions & 17 deletions

File tree

website/docs/implementation_guides/javascript/docs/consumer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,4 +371,4 @@ const rules: Rules = {
371371

372372
_NOTE:_ `withMatchingRules` / `matchingRules` is an advanced feature intended for edge cases where the fluent DSL does not cover your needs. For most multipart tests, `multipartBody` is sufficient.
373373

374-
For working examples, see the [v4 multipart example](https://github.com/pact-foundation/pact-js/tree/master/examples/v4/multipart/).
374+
For working examples, see the [v4 multipart example](https://github.com/pact-foundation/pact-js/tree/master/examples/multipart/).

website/docs/implementation_guides/javascript/docs/graphql.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,4 @@ No special configuration is required on the provider side — GraphQL interactio
107107

108108
## Working Examples
109109

110-
See the [v4 GraphQL example](https://github.com/pact-foundation/pact-js/tree/master/examples/v4/graphql/) for a complete runnable project, including both consumer and provider tests.
111-
112-
For `PactV3` examples, see the [v3 GraphQL example](https://github.com/pact-foundation/pact-js/tree/master/examples/v3/graphql/).
110+
See the [v4 GraphQL example](https://github.com/pact-foundation/pact-js/tree/master/examples/graphql/) for a complete runnable project, including both consumer and provider tests.

website/docs/implementation_guides/javascript/docs/matching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ these can be used to match a hypermedia format like Siren, see [Example Pact + S
273273

274274
The `fromProviderState` matching function allows values to be generated based on values returned from the provider state callbacks. This should be used for the cases were database entries have auto-generated values and these values need to be used in the URLs or query parameters.
275275

276-
For an example, see [examples/v3/provider-state-injected](https://github.com/pact-foundation/pact-js/tree/master/examples/v3/provider-state-injected).
276+
For an example, see [examples/provider-state](https://github.com/pact-foundation/pact-js/tree/master/examples/provider-state).
277277

278278
For this to work, in the consumer test we use the `fromProviderState` matching function which takes an expression and an example value. The example value will be used in the consumer test.
279279

website/docs/implementation_guides/javascript/docs/plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,4 @@ const v = new Verifier({
192192
return v.verifyProvider();
193193
```
194194
195-
For a full working example with HTTP, TCP, and message verification combined, see the [v4 plugins example](https://github.com/pact-foundation/pact-js/tree/master/examples/v4/plugins/).
195+
For a full working example with HTTP, TCP, and message verification combined, see the [v4 plugins example](https://github.com/pact-foundation/pact-js/tree/master/examples/plugins/).

website/docs/implementation_guides/javascript/docs/provider.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Read more about [Verifying Pacts](https://docs.pact.io/getting_started/verifying
141141

142142
#### API with Provider States
143143

144-
If you have defined any `state`s in your consumer tests, the `Verifier` can put the provider into the right state prior to sending the request. For example, the provider can use the state to mock away certain database queries. To support this, set up a handler for each `state` using hooks on the `stateHandlers` property. Here is an example from our [e2e suite](https://github.com/pact-foundation/pact-js/blob/master/examples/v3/e2e/test/provider.spec.js):
144+
If you have defined any `state`s in your consumer tests, the `Verifier` can put the provider into the right state prior to sending the request. For example, the provider can use the state to mock away certain database queries. To support this, set up a handler for each `state` using hooks on the `stateHandlers` property. Here is an example from our [http suite](https://github.com/pact-foundation/pact-js/tree/master/examples/http/provider.test.ts):
145145

146146
Provider state callbacks can also return a map of key-value values. These are used with provider-state injected values.
147147

@@ -211,7 +211,7 @@ Provider state callbacks can also return a map of key-value values. These are us
211211
},
212212
```
213213

214-
For a more detailed example, see the [provider state injected project](https://github.com/pact-foundation/pact-js/blob/master/examples/v3/provider-state-injected/provider/account-service.test.js) in the examples folder
214+
For a more detailed example, see the [provider state project](https://github.com/pact-foundation/pact-js/blob/master/examples/provider-state/provider.test.ts) in the examples folder
215215

216216
You can think of regular provider states as only being the "setup" phase.
217217

website/docs/implementation_guides/javascript/docs/troubleshooting.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,7 @@ Also, [from Jest 20](https://facebook.github.io/jest/blog/2017/05/06/jest-20-del
126126

127127
Jest also runs tests in parallel by default, which can be problematic with Pact which is stateful. See [parallel tests](#parallel-tests) to see how to make it run in parallel, or run Jest with the `--runInBand` [option](https://facebook.github.io/jest/docs/en/cli.html#runinband) to run them sequentially.
128128

129-
See [this issue](https://github.com/pact-foundation/pact-js/issues/10) for background,
130-
and the Jest [example](https://github.com/pact-foundation/pact-js/blob/master/examples/v2/jest/package.json#L10-L12) for a working example.
131-
132-
## Usage with Mocha
133-
134-
See [`./examples/mocha`](https://github.com/pact-foundation/pact-js/blob/master/examples/v2/mocha/)
135-
<!-- Consider the use of the `mocha-pact` [package](https://www.npmjs.com/package/mocha-pact) -->
129+
See [this issue](https://github.com/pact-foundation/pact-js/issues/10) for background.
136130

137131
## Usage with Angular
138132

website/docs/implementation_guides/javascript/docs/xml.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ body: new XmlBuilder("1.0", "UTF-8", "ns1:projects").build((el) => {
5757
})
5858
```
5959

60-
For a more detailed example, see the todo-consumer project, specifically [consumer.spec.js](https://github.com/pact-foundation/pact-js/blob/master/examples/v3/todo-consumer/test/consumer.spec.js), [provider.spec.js](https://github.com/pact-foundation/pact-js/blob/master/examples/v3/e2e/todo-consumer/provider.spec.js) in the examples folder.
60+
For a more detailed example, see the todo-consumer project, specifically [consumer.test.ts](https://github.com/pact-foundation/pact-js/blob/master/examples/xml/consumer.test.ts) in the examples folder.

website/docs/implementation_guides/javascript/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ describe('GET /dogs', () => {
192192
});
193193
```
194194

195-
You can see (and run) the full version of this in `./examples/v3/typescript`, as well as other examples in the parent folder.
195+
You can see (and run) the full example in `./examples/http`, as well as other examples in the parent folder.
196196

197197
To run the examples
198198

0 commit comments

Comments
 (0)