From cc8b64129ef56edaf3b84b842a2af7c71966a501 Mon Sep 17 00:00:00 2001 From: Pawfa Date: Wed, 23 Feb 2022 16:16:29 +0100 Subject: [PATCH] refactor: Remove generate-contracts-form.test.ts as it duplicates existing test case in publish.ts --- test/generate-contracts-form.test.ts | 34 ---------------------------- 1 file changed, 34 deletions(-) delete mode 100644 test/generate-contracts-form.test.ts diff --git a/test/generate-contracts-form.test.ts b/test/generate-contracts-form.test.ts deleted file mode 100644 index 73c20bb..0000000 --- a/test/generate-contracts-form.test.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { pactMockFactory } from './mocks/pact.mock'; -import { generateContractsForm } from '../src/utils/generate-contracts-form'; - -describe('generateContractsForm', () => { - test('returns correct ServiceContractsForm', () => { - const pactMockForProviderService1 = pactMockFactory.build(); - const pactMockForProviderService2 = pactMockFactory.build({ - provider: { name: 'provider-service-2' }, - }); - - const serviceContractsForm = generateContractsForm([ - pactMockForProviderService1, - pactMockForProviderService2, - ]); - - expect(serviceContractsForm).toEqual({ - capabilities: {}, - expectations: { - [pactMockForProviderService1.provider.name]: { - rest: { - value: JSON.stringify(pactMockForProviderService1), - mimeType: 'application/json', - }, - }, - [pactMockForProviderService2.provider.name]: { - rest: { - value: JSON.stringify(pactMockForProviderService2), - mimeType: 'application/json', - }, - }, - }, - }); - }); -});