Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Oct 9, 2023
1 parent 41732df commit 6dee0d4
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
62 changes: 62 additions & 0 deletions package-lock.json

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

31 changes: 31 additions & 0 deletions test/integration/generate/fromTemplate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,37 @@ describe('template', () => {
done();
});
});

test
.stderr()
.stdout()
.command([
'generate:fromTemplate',
asyncapiv3,
'@asyncapi/markdown-template', '--output=./test/docs/v3/markdown-template', '--force-write'])
.it('should be able to use AsyncAPI v3 with markdown', (ctx, done) => {
expect(ctx.stdout).toContain(
'Check out your shiny new generated files at ./test/docs/v3/markdown-template.\n\n'
);
cleanup('./test/docs/v3/markdown-template');
done();
});

test
.stderr()
.stdout()
.command([
'generate:fromTemplate',
asyncapiv3,
'@asyncapi/html-template', '--output=./test/docs/v3/html-template', '--force-write'])
.it('should be able to use AsyncAPI v3 with markdown', (ctx, done) => {
expect(ctx.stdout).toContain(
'Check out your shiny new generated files at ./test/docs/v3/html-template.\n\n'
);
cleanup('./test/docs/v3/html-template');
done();
});

describe('git clash', () => {
const pathToOutput = './test/docs/2';
before(() => {
Expand Down

0 comments on commit 6dee0d4

Please sign in to comment.