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

Remove eslint-disable no-undef And Add Jest in Eslint Config #8042

Merged
merged 1 commit into from May 15, 2024

Conversation

shirady
Copy link
Contributor

@shirady shirady commented May 12, 2024

Explain the changes

  1. Remove eslint-disable no-undef in the Jest test files and add jest in eslint config.
  2. Add the function fail in file test_nc_master_keys.test.

Issues: Fixed #xxx / Gap #xxx

  1. According to the Jest documentation we can avoid using eslint-disable no-undef, by adding the jest environment (here).

Testing Instructions:

  1. Tested in the CI in Jest Unit Tests.
  2. For the change in
    After removing the eslint-disable no-undef I saw that:

/root/node_modules/noobaa-core/src/test/unit_tests/jest_tests/test_nc_master_keys.test.js 72:13 error 'fail' is not defined no-undef 85:13 error 'fail' is not defined no-undef

Please run: sudo npx jest test_nc_master_keys.test.js.

  • Doc added/updated
  • Tests added

Copy link
Contributor

@liranmauda liranmauda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shirady shirady force-pushed the jest-eslint-config-avoid-no-undef branch from 64982f2 to 64a9a23 Compare May 15, 2024 06:06
1. Remove eslint-disable no-undef in the Jest test files and add jest in eslint config.
2. Add the function fail in file test_nc_master_keys.test.

Signed-off-by: shirady <57721533+shirady@users.noreply.github.com>
@shirady shirady force-pushed the jest-eslint-config-avoid-no-undef branch from 64a9a23 to d1370c8 Compare May 15, 2024 06:07
@shirady shirady merged commit 7cab0c1 into noobaa:master May 15, 2024
10 checks passed
@shirady shirady deleted the jest-eslint-config-avoid-no-undef branch May 15, 2024 06:41
@shirady shirady self-assigned this May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants