Skip to content

Commit

Permalink
Fix test case issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSaini101 committed May 30, 2024
1 parent ada8703 commit 51df567
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/commands/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ export default class Validate extends Command {
if (flags['score']) {
this.specFile = await load(filePath);
const { document } = await parse(this,this.specFile);
const score = await calculateScore(document);
this.log(`The score of asyncapi document is ${ score}`);
this.log(`The score of the asyncapi document is ${await calculateScore(document)}`);
}
this.specFile = await load(filePath);
if (watchMode) {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/validate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ describe('validate', () => {
.stdout()
.command(['validate', './test/fixtures/asyncapiTestingScore.yml', '--score'])
.it('work with --score flag', (ctx, done) => {
expect(ctx.stdout).to.contains('The score of the asyncapi document is 100');
expect(ctx.stdout).to.contains('The score of the asyncapi document is 100\n');
expect(ctx.stdout).to.contains('File ./test/fixtures/asyncapiTestingScore.yml is valid! File ./test/fixtures/asyncapiTestingScore.yml and referenced documents don\'t have governance issues.');
done();
});
Expand Down

0 comments on commit 51df567

Please sign in to comment.