Skip to content

Commit

Permalink
Add test case for the optimize command
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSaini101 committed Jan 4, 2025
1 parent 6c798d2 commit 14ce7d8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/integration/optimize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ describe('optimize', () => {
expect(ctx.stderr).to.equal('');
done();
});
test
.stderr()
.stdout()
.command(['optimize', 'http://localhost:8080/dummySpec.yml --proxyHost=host --proxyPort=8080'])
.it('should throw error when url is passed with proxyHost and proxyPort with invalid host ', (ctx, done) => {
expect(ctx.stdout).to.contain('');
expect(ctx.stderr).to.equal('error loading AsyncAPI document from url: Failed to download http://localhost:8080/dummySpec.yml --proxyHost=host --proxyPort=8080.\n');
done();
});
});

describe('with no arguments', () => {
Expand Down

0 comments on commit 14ce7d8

Please sign in to comment.