Skip to content

Commit

Permalink
fix: update @asyncapi/generator to 1.15.1 version (#928)
Browse files Browse the repository at this point in the history
Co-authored-by: asyncapi-bot-eve <bot+eve@asyncapi.io>%0ACo-authored-by: asyncapi-bot <info@asyncapi.io>%0ACo-authored-by: Lukasz Gornicki <lpgornicki@gmail.com>
  • Loading branch information
asyncapi-bot and derberg authored Nov 29, 2023
1 parent becec23 commit 9ffa29c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
42 changes: 21 additions & 21 deletions test/integration/generate/fromTemplate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -140,7 +140,7 @@ describe('template', () => {
});
});

it('should install template', () => {
describe('should install template', () => {
test
.stdout()
.command([
Expand Down

0 comments on commit 9ffa29c

Please sign in to comment.