Skip to content

Commit

Permalink
fix: changes in testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Adi-204 committed Feb 4, 2025
1 parent 64b7cbd commit b67cd4f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
2 changes: 1 addition & 1 deletion src/commands/new/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
20 changes: 0 additions & 20 deletions test/integration/new/file.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit b67cd4f

Please sign in to comment.