From 9ffa29c916f0f24f31604bb79e699ccb816e7ad7 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 29 Nov 2023 13:19:12 +0100 Subject: [PATCH] fix: update @asyncapi/generator to 1.15.1 version (#928) Co-authored-by: asyncapi-bot-eve %0ACo-authored-by: asyncapi-bot %0ACo-authored-by: Lukasz Gornicki --- package-lock.json | 8 ++-- package.json | 2 +- .../integration/generate/fromTemplate.test.ts | 42 +++++++++---------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9f4bdd83fda..b501ee9748a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@asyncapi/bundler": "^0.3.8", "@asyncapi/converter": "^1.4.2", "@asyncapi/diff": "^0.4.1", - "@asyncapi/generator": "^1.15.0", + "@asyncapi/generator": "^1.15.1", "@asyncapi/modelina": "^2.0.2", "@asyncapi/openapi-schema-parser": "^3.0.5", "@asyncapi/optimizer": "^0.2.3", @@ -422,9 +422,9 @@ } }, "node_modules/@asyncapi/generator": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.15.0.tgz", - "integrity": "sha512-lSza3qYmGiRJ9Sge+ZnGt/6yJEtdUtSNFlQERe/ZA2+pLI275bBxjSpTNs4bu5o02ujW0qoVBNLm53OkPduZeQ==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.15.1.tgz", + "integrity": "sha512-8yhEGSaASmKIQlSjmH6RBpsCRJ6c8oWSfY0WCWSk7+lw9eyuFzhq57XKfFAexy2GCVoHAx67VA6/4Na8I2nwew==", "dependencies": { "@asyncapi/generator-react-sdk": "^1.0.2", "@asyncapi/parser": "^2.1.2", diff --git a/package.json b/package.json index cd3b56c8807..5ffdac47463 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "@asyncapi/bundler": "^0.3.8", "@asyncapi/converter": "^1.4.2", "@asyncapi/diff": "^0.4.1", - "@asyncapi/generator": "^1.15.0", + "@asyncapi/generator": "^1.15.1", "@asyncapi/modelina": "^2.0.2", "@asyncapi/openapi-schema-parser": "^3.0.5", "@asyncapi/optimizer": "^0.2.3", diff --git a/test/integration/generate/fromTemplate.test.ts b/test/integration/generate/fromTemplate.test.ts index ee26fe04413..fe5e0cd126a 100644 --- a/test/integration/generate/fromTemplate.test.ts +++ b/test/integration/generate/fromTemplate.test.ts @@ -3,7 +3,6 @@ import * as path from 'path'; import { test } from '@oclif/test'; import rimraf from 'rimraf'; import { expect } from '@oclif/test'; -import { it } from 'mocha'; const generalOptions = [ 'generate:fromTemplate', @@ -54,36 +53,37 @@ describe('template', () => { fs.writeFileSync(path.join(pathToOutput, 'random.md'), ''); }); test - .skip() .stderr() - .command([...generalOptions, '--output=./test/docs/2']) + .command([...generalOptions, `--output=${pathToOutput}`]) .it( 'should throw error if output folder is in a git repository', (ctx, done) => { expect(ctx.stderr).to.contain( - 'Error: "./test/docs/2" is in a git repository with unstaged changes.' + `Error: "${pathToOutput}" is in a git repository with unstaged changes.` ); - cleanup('./test/docs/2'); + cleanup(pathToOutput); done(); } ); }); - test - .stdout() - .command([ - ...generalOptions, - '-p=version=1.0.0 mode=development', - '--output=./test/docs/3', - '--force-write', - ]) - .it('should pass custom param in the template', (ctx, done) => { - expect(ctx.stdout).to.contain( - 'Check out your shiny new generated files at ./test/docs/3.\n\n' - ); - cleanup('./test/docs/3'); - done(); - }); + describe('custom params', () => { + test + .stdout() + .command([ + ...generalOptions, + '-p=version=1.0.0 mode=development', + '--output=./test/docs/3', + '--force-write', + ]) + .it('should pass custom param in the template', (ctx, done) => { + expect(ctx.stdout).to.contain( + 'Check out your shiny new generated files at ./test/docs/3.\n\n' + ); + cleanup('./test/docs/3'); + done(); + }); + }); describe('disable-hooks', () => { test @@ -140,7 +140,7 @@ describe('template', () => { }); }); - it('should install template', () => { + describe('should install template', () => { test .stdout() .command([