Skip to content
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

Merged
merged 2 commits into from
Nov 27, 2024
Merged

Add the Access error #98

merged 2 commits into from
Nov 27, 2024

Conversation

w3nl
Copy link
Contributor

@w3nl w3nl commented Nov 27, 2024

No description provided.

@w3nl w3nl requested a review from Copilot November 27, 2024 09:51
Copy link

@Copilot Copilot AI left a 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() {

/* eslint-disable sonarjs/no-duplicate-string */

describe('Access Error test', () => {
it('It should create a Access error', () => {
Copy link
Preview

Copilot AI Nov 27, 2024

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'.

Suggested change
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.

@w3nl w3nl requested a review from Copilot November 27, 2024 09:55
Copy link

@Copilot Copilot AI left a 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')
Copy link
Preview

Copilot AI Nov 27, 2024

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'.

Suggested change
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.

@w3nl w3nl merged commit 2b65db3 into main Nov 27, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants