-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(server): added server.summary() and hasSummary() functions #1080
base: master
Are you sure you want to change the base?
fix(server): added server.summary() and hasSummary() functions #1080
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
packages/parser/jest.config.ts
Outdated
@@ -18,7 +18,7 @@ const config: Config.InitialOptions = { | |||
|
|||
// Test spec file resolution pattern | |||
// Matches parent folder `__tests__` and filename | |||
// should contain `test` or `spec`. | |||
// should contain `btest` or `spec`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// should contain `btest` or `spec`. | |
// should contain `test` or `spec`. |
packages/parser/package.json
Outdated
@@ -80,7 +80,7 @@ | |||
"eslint-plugin-github": "^4.3.7", | |||
"eslint-plugin-security": "^1.5.0", | |||
"eslint-plugin-sonarjs": "^0.15.0", | |||
"jest": "^29.0.2", | |||
"jest": "^29.7.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not upgrade jest if not needed. If you want to update it, please open a separate PR.
@@ -26,7 +26,6 @@ export class Server extends CoreModel<v3.ServerObject, { id: string }> implement | |||
id(): string { | |||
return this._meta.id; | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this.
|
||
describe('.hasSummary()', function () { | ||
it('should return true if summary is present', function () { | ||
expect(docItem.hasSummary()).toEqual(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should test the opposite as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like for a case where the summary isn't present?
expect(docItem.hasSummary()).toEqual(true); | ||
}); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- summary(): Returns the server summary string or undefined - hasSummary(): Returns boolean indicating if summary exists - Added unit tests for the respective functions - Tested the code by building, ensuring changes in esm, cjs
- now it points the ./eslintrc correctly
56d6360
to
399a6ae
Compare
Quality Gate passedIssues Measures |
@smoya I've made the changes as requested! |
Description
list:fix
inpackage.json
of multi-parserRelated issue(s)
Fixes #1076