internals.provider = new Pact({
port: 1234,
dir: resolve(process.cwd(), 'pacts'),
- consumer: 'ForumsStore',
- provider: 'ForumAPIServer'
+ consumer: 'ForumClient',
+ provider: 'ForumServer',
+ pactfileWriteMode: 'update'
});
await internals.provider.setup();
afterEach(() => internals.provider.verify());
afterAll(() => internals.provider.finalize());
- describe('When there\'s forums', () => {
+ describe('When there\'s data', () => {
describe('GetForums', () => {
beforeAll(async () => {
const forumQuery = new GraphQLInteraction()
- .given('there\'s forums')
+ .given('there\'s data')
.uponReceiving('a request to list the forums')
.withRequest({
path: '/graphql',
beforeAll(async () => {
const forumQuery = new GraphQLInteraction()
- .given('there\'s forums')
+ .given('there\'s data')
.uponReceiving('a request to get a single forum')
.withRequest({
path: '/graphql',
});
});
- describe('When there\'s no forums', () => {
+ describe('When there\'s no data', () => {
describe('GetForums', () => {
beforeAll(async () => {
const forumQuery = new GraphQLInteraction()
- .given('there\'s no forums')
+ .given('there\'s no data')
.uponReceiving('a request to list the forums')
.withRequest({
path: '/graphql',
beforeAll(async () => {
const forumQuery = new GraphQLInteraction()
- .given('there\'s no forums')
+ .given('there\'s no data')
.uponReceiving('a request to get a single forum')
.withRequest({
path: '/graphql',