Skip to content

Commit

Permalink
test: Extend V3 example to illustrate issue on slack
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyJones committed Oct 3, 2022
1 parent 0e9b512 commit 2a6ab17
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/v3/pactwith.v3.test.ts
@@ -1,9 +1,16 @@
import { V3MockServer } from '@pact-foundation/pact';
import { eachLike } from '@pact-foundation/pact/src/v3/matchers';
import * as supertest from 'supertest';
import { pactWith } from './index';

const getClient = (mock: V3MockServer) => supertest(mock.url);

const EXISTING_EVENT_DATA = {
name: 'test event 1',
id: '1cb9eb9e',
teamId: 'dummy_tid',
};

pactWith({ consumer: 'MyConsumer', provider: 'pactWith v3' }, (interaction) => {
interaction('pact integration', ({ provider, execute }) => {
beforeEach(() =>
Expand All @@ -17,6 +24,9 @@ pactWith({ consumer: 'MyConsumer', provider: 'pactWith v3' }, (interaction) => {
})
.willRespondWith({
status: 200,
body: {
items: eachLike(EXISTING_EVENT_DATA),
},
})
);

Expand Down

0 comments on commit 2a6ab17

Please sign in to comment.