From 57166aa9401c56de2df5c5ed700ce14c76c99eb7 Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Sun, 5 Jan 2025 12:44:07 +0530 Subject: [PATCH] Remove unwanted file and update test case --- src/core/errors/proxy-error.ts | 8 -------- test/integration/convert.test.ts | 2 +- test/integration/validate.test.ts | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 src/core/errors/proxy-error.ts diff --git a/src/core/errors/proxy-error.ts b/src/core/errors/proxy-error.ts deleted file mode 100644 index c7520232991..00000000000 --- a/src/core/errors/proxy-error.ts +++ /dev/null @@ -1,8 +0,0 @@ -export class ProxyError extends Error { - constructor(err: Error) { - super(); - this.name = 'Error in the Connection'; - this.message = err.message; - } -} - diff --git a/test/integration/convert.test.ts b/test/integration/convert.test.ts index 8a62d61d4df..8ece2507365 100644 --- a/test/integration/convert.test.ts +++ b/test/integration/convert.test.ts @@ -64,7 +64,7 @@ describe('convert', () => { .command(['convert', '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: Proxy Connection Error: Unable to establish a connection to the proxy check hostName or PortNumber.\n'); + 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(); }); }); diff --git a/test/integration/validate.test.ts b/test/integration/validate.test.ts index c735befc7ab..0cdd7da992f 100644 --- a/test/integration/validate.test.ts +++ b/test/integration/validate.test.ts @@ -71,7 +71,7 @@ describe('validate', () => { .command(['validate', '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: Proxy Connection Error: Unable to establish a connection to the proxy check hostName or PortNumber.\n'); + 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(); });