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 all no-import-assign errors from tests #10002

Open
1 of 2 tasks
DarioR01 opened this issue Mar 30, 2022 · 0 comments
Open
1 of 2 tasks

Remove all no-import-assign errors from tests #10002

DarioR01 opened this issue Mar 30, 2022 · 0 comments
Labels
technical-work Technical debt, support work and building new technical tools and features

Comments

@DarioR01
Copy link
Contributor

DarioR01 commented Mar 30, 2022

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Following the meeting about upgrading major dependencies, we discussed the no-import-assign rule coming from eslint-config-airbnb to v19.
This anti-pattern of importing something into a namespace and assigning that namespace a different value is not recommended.

We only use this anti-pattern in our unit test cases, this PR will take care of places where we use this pattern so that we can later enforce this by upgrading to the new major version of eslint-config-airbnb.

Describe the solution you'd like

  1. Identify a solution that will allow our unit tests to not use the above-described anti-pattern.
  2. Identify all the files that use the anti-pattern described above (marked with no-import-assign error).
  3. Apply the found solution to all the identified files.

To identify the files

  1. checkout into renovate/eslint-config-airbnb-19.x with git checkout renovate/eslint-config-airbnb-19.x
  2. run yarn && yarn test:lint
  3. Locate all files with no-import-assign error description on the output

Alternatively

  1. Go to https://github.com/bbc/simorgh/runs/5754191013?check_suite_focus=true
  2. Locate all files with no-import-assign error description

Alternatively

  1. checkout into renovate/eslint-config-airbnb-19.x with git checkout renovate/eslint-config-airbnb-19.x
  2. run yarn && yarn test:lint
  3. Locate all files with no-import-assign error description on the output

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Testing notes
[Tester to complete]

Dev insight: Will Cypress tests be required or are unit tests sufficient? Will there be any potential regression? etc

  • This feature is expected to need manual testing.

Checklist

Additional context
Add any other context or screenshots about the feature request here.

@DarioR01 DarioR01 added Refinement Needed This is ready for refinement. It shouldn't be worked on until it has been refined by Dev & Test. technical-work Technical debt, support work and building new technical tools and features and removed Refinement Needed This is ready for refinement. It shouldn't be worked on until it has been refined by Dev & Test. labels Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical-work Technical debt, support work and building new technical tools and features
Projects
None yet
Development

No branches or pull requests

1 participant