Skip to content

Commit 14ce7d8

Browse files
Add test case for the optimize command
1 parent 6c798d2 commit 14ce7d8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/integration/optimize.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ describe('optimize', () => {
5858
expect(ctx.stderr).to.equal('');
5959
done();
6060
});
61+
test
62+
.stderr()
63+
.stdout()
64+
.command(['optimize', 'http://localhost:8080/dummySpec.yml --proxyHost=host --proxyPort=8080'])
65+
.it('should throw error when url is passed with proxyHost and proxyPort with invalid host ', (ctx, done) => {
66+
expect(ctx.stdout).to.contain('');
67+
expect(ctx.stderr).to.equal('error loading AsyncAPI document from url: Failed to download http://localhost:8080/dummySpec.yml --proxyHost=host --proxyPort=8080.\n');
68+
done();
69+
});
6170
});
6271

6372
describe('with no arguments', () => {

0 commit comments

Comments
 (0)