Skip to content

Commit

Permalink
chore: merge master into next-major
Browse files Browse the repository at this point in the history
  • Loading branch information
smoya committed Apr 27, 2023
1 parent fef397d commit 8c7865d
Show file tree
Hide file tree
Showing 2 changed files with 211 additions and 4 deletions.
207 changes: 207 additions & 0 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions test/parser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('parse()', function() {

it('should parse valid AsyncAPI', async function() {
const { document, diagnostics } = await coreParser.parse(inputWithValidAsyncAPI);
expect(filterDiagnostics(diagnostics, 'asyncapi-schemas-v2')).toHaveLength(0);
expect(filterDiagnostics(diagnostics, 'asyncapi2-schemas')).toHaveLength(0);
doParseCoreTest((document?.json()?.channels?.myChannel?.publish?.message as any)?.payload, outputWithSimpleRAML);
doParseCoreTest((document?.json()?.components?.messages?.testMessage as any)?.payload, outputWithSimpleRAML);
});
Expand Down Expand Up @@ -77,13 +77,13 @@ describe('validate()', function() {

it('should validate valid AsyncAPI', async function() {
const diagnostics = await coreParser.validate(inputWithValidAsyncAPI);
expect(filterDiagnostics(diagnostics, 'asyncapi-schemas-v2')).toHaveLength(0);
expect(filterDiagnostics(diagnostics, 'asyncapi2-schemas')).toHaveLength(0);
});

it('should validate invalid AsyncAPI', async function() {
const diagnostics = await coreParser.validate(inputWithInvalidAsyncAPI);
expect(filterDiagnostics(diagnostics, 'asyncapi-schemas-v2')).toHaveLength(2);
expectDiagnostics(diagnostics, 'asyncapi-schemas-v2', [
expect(filterDiagnostics(diagnostics, 'asyncapi2-schemas')).toHaveLength(2);
expectDiagnostics(diagnostics, 'asyncapi2-schemas', [
// in channels
{
message: 'Property \'examples\' should be a map',
Expand Down

0 comments on commit 8c7865d

Please sign in to comment.