From b67cd4f2986c3f5dd455fc0824143e4e6a00ff34 Mon Sep 17 00:00:00 2001 From: Adi-204 Date: Tue, 4 Feb 2025 19:51:52 +0530 Subject: [PATCH] fix: changes in testing --- src/commands/new/index.ts | 2 +- test/integration/new/file.test.ts | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/commands/new/index.ts b/src/commands/new/index.ts index 21681adcf11..7367ea5e8b4 100644 --- a/src/commands/new/index.ts +++ b/src/commands/new/index.ts @@ -2,7 +2,7 @@ import Command from '../../core/base'; import { Help } from '@oclif/core'; export default class New extends Command { - static description = 'Create a new AsyncAPI project, specification files, or templates for clients and applications.'; + static readonly description = 'Create a new AsyncAPI project, specification files, or templates for clients and applications.'; async run() { const help = new Help(this.config); help.showHelp(['new', '--help']); diff --git a/test/integration/new/file.test.ts b/test/integration/new/file.test.ts index d957857d49f..b1505c62d96 100644 --- a/test/integration/new/file.test.ts +++ b/test/integration/new/file.test.ts @@ -5,31 +5,11 @@ import { expect } from '@oclif/test'; const testHelper = new TestHelper(); describe('new', () => { - before(() => { - try { - testHelper.deleteSpecFileAtWorkingDir(); - } catch (e: any) { - if (e.code !== 'ENOENT') { - throw e; - } - } - }); - describe('create new file', () => { afterEach(() => { testHelper.deleteSpecFileAtWorkingDir(); }); - test - .stderr() - .stdout() - .command(['new', '--no-tty', '-n=specification.yaml']) - .it('runs new command', async (ctx,done) => { - expect(ctx.stderr).to.equal(''); - expect(ctx.stdout).to.equal('The specification.yaml has been successfully created.\n'); - done(); - }); - test .stderr() .stdout()