Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My contribution on Chai-http was to add tests to have an impeccable code JS and to avoid the regressions. It is important to run these tests regularly for more stable code rendering.
For this, I had to use a tool named Eslint that statically analyzes the code and verifies that it follows a certain number of rules, they are obviously configurable. ESLint is available as a NPM package, which gives us the choice between a global and local installation, but here I opted for local installation, configuration at the devDependencies level and the package.json script.
In the event of a syntax error in your code, the static analysis of this code will fail, and the error in question will be sent back to you, which you could correct from the command: npm lint: fix, and the rest mannually or by adding some exception rule.
Hope this will be helpful.