-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add the Access error #98
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.
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 suggestion.
Files not reviewed (1)
- package.json: Language not supported
Comments skipped due to low confidence (1)
src/access-error.js:18
- [nitpick] The method name 'errorStatus' is inconsistent with typical naming conventions. It should be renamed to 'status' for clarity.
get errorStatus() {
src/__tests__/access-error.unit.js
Outdated
/* eslint-disable sonarjs/no-duplicate-string */ | ||
|
||
describe('Access Error test', () => { | ||
it('It should create a Access error', () => { |
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.
The test description should be 'It should create an Access error'.
it('It should create a Access error', () => { | |
it('It should create an Access error', () => { |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
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.
Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 suggestion.
Files not reviewed (2)
- package.json: Language not supported
- src/access-error.js: Evaluated as low risk
Comments skipped due to low confidence (4)
src/tests/app-error.unit.js:8
- The article 'an' is correctly used here instead of 'a'.
it('It should create an app error with minimum fields', () => {
src/tests/app-error.unit.js:25
- The article 'an' is correctly used here instead of 'a'.
it('It should create an app error with null on optional fields', () => {
src/tests/app-error.unit.js:45
- The article 'an' is correctly used here instead of 'a'.
it('It should create an app error with undefined on optional fields', () => {
src/tests/app-error.unit.js:65
- The article 'an' is correctly used here instead of 'a'.
it('It should create an app error', () => {
assert.deepEqual(error instanceof AccessError, true) | ||
assert.deepEqual(error instanceof Error, true) | ||
assert.deepEqual(error.name, 'AccessError') | ||
assert.deepEqual(error.message, 'Invalid error') |
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.
The error message should be consistent with the test case description. It should be 'Example text' instead of 'Invalid error'.
assert.deepEqual(error.message, 'Invalid error') | |
assert.deepEqual(error.message, 'Example text') |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
No description provided.