Skip to content

Commit

Permalink
remove tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Oct 9, 2023
1 parent 8bc7f1a commit 9c3cf3d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 57 deletions.
11 changes: 0 additions & 11 deletions test/fixtures/specification-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ servers:
'read:pets': read your pets
scopes:
- 'write:pets'
- type: openIdConnect
openIdConnectUrl: openIdConnectUrl
scopes:
- 'some:scope:1'
- 'some:scope:2'
production:
host: 'api.streetlights.smartylighting.com:{port}'
pathname: /some/path
Expand Down Expand Up @@ -102,8 +97,6 @@ channels:
subscribe.message.2:
payload:
type: object
subscribe.message.3:
$ref: 'https://example.com/message'
servers:
- $ref: '#/servers/default'
- $ref: '#/servers/production'
Expand Down Expand Up @@ -154,7 +147,6 @@ operations:
#/channels/smartylighting~1streetlights~11~10~1action~1{streetlightId}~1turn~1on/messages/customMessageId
- $ref: >-
#/channels/smartylighting~1streetlights~11~10~1action~1{streetlightId}~1turn~1on/messages/subscribe.message.2
- $ref: 'https://example.com/message'
turnOnOff:
action: send
channel:
Expand Down Expand Up @@ -242,9 +234,6 @@ components:
availableScopes:
'write:pets': modify pets in your account
'read:pets': read your pets
openIdConnect:
type: openIdConnect
openIdConnectUrl: openIdConnectUrl
unusedFlows:
type: oauth2
flows:
Expand Down
47 changes: 1 addition & 46 deletions test/integration/generate/fromTemplate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,59 +23,14 @@ describe('template', () => {
test
.stdout()
.command([...generalOptions, '--output=./test/docs/1', '--force-write'])
.it('should generate minimal tempalte', (ctx, done) => {
.it('should generate minimal template', (ctx, done) => {
expect(ctx.stdout).to.contain(
'Check out your shiny new generated files at ./test/docs/1.\n\n'
);
cleanup('./test/docs/1');
done();
});

describe('should handle AsyncAPI v3 document correctly', () => {
test
.stderr()
.stdout()
.command([
'generate:fromTemplate',
asyncapiv3,
'@asyncapi/minimaltemplate'])
.it('give error', (ctx, done) => {
expect(ctx.stderr).to.equal('Error: @asyncapi/minimaltemplate template does not support AsyncAPI v3 documents, please checkout some link\n');
expect(ctx.stdout).to.equal('');
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).to.contain(
'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).to.contain(
'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 9c3cf3d

Please sign in to comment.