Skip to content

Commit

Permalink
chore: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Aug 22, 2023
1 parent f583ac7 commit 8510756
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions test/e2e/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {expectToFail} from '../helpers/expect-to-fail';

interface InvokeCommandOptions {
analyticsUrl?: string;
auth?: string;
mock: string;
providerName?: string;
swagger: string;
Expand Down Expand Up @@ -42,10 +41,6 @@ const invokeCommand = (options: InvokeCommandOptions): Promise<string> => {
command += ` --analyticsUrl ${options.analyticsUrl}`;
}

if (options.auth) {
command += ` --user ${options.auth}`;
}

if (options.outputDepth) {
command += ` --outputDepth ${options.outputDepth}`;
}
Expand Down Expand Up @@ -372,22 +367,6 @@ describe('swagger-mock-validator/cli', () => {
);
}, 30000);

it('should make an authenticated request to the provided pact broker url when asked to do so', async () => {
const auth = 'user:pass';

await invokeCommand({
auth,
mock: urlTo('test/e2e/fixtures/pact-broker.json'),
providerName: 'provider-1',
swagger: urlTo('test/e2e/fixtures/swagger-provider.json')
});

expect(mockPactBroker.get).toHaveBeenCalledWith(
jasmine.objectContaining({authorization: 'Basic dXNlcjpwYXNz'}),
jasmine.stringMatching('test/e2e/fixtures/pact-broker.json')
);
}, 30000);

it('should format output objects to depth 0', async () => {
const result = await invokeCommand({
mock: 'test/e2e/fixtures/pact-working-consumer.json',
Expand Down

0 comments on commit 8510756

Please sign in to comment.