Closed hot9cups closed 2 years ago
Good to see the green check for the lint tests, finally :)
node .\Tests.js
too passes all unit tests now!
Nice! super happy to see this!
Could you add to the README file an example of how to run the test locally?
Right, sure. Did you mean the unit tests though? I believe we already have them - node Tests.js
?
Or was it the linting tests. I'm not sure what's the universal way of doing it. I installed EsLint locally and ran it through the CLI. I'll add instructions for doing both if that's what you're referring to.
Right, sure. Did you mean the unit tests though? I believe we already have them - node Tests.js ?
Or was it the linting tests. I'm not sure what's the universal way of doing it. I installed EsLint locally and ran it through the CLI. I'll add instructions for doing both if that's what you're referring to.
Lint tests I meant, we can include the EsLint
library in the repository and have a command that runs it locally. Additionally, we can have another command that runs UnitTest and Lint test e.g.
node Test.js // runs all the unit tests. It already exists.
node LintTest // runs all the unit tests.
node test // runs Linter + unit tests. We can rename Test.js with a specific name for unit tests.
I will merge this PR and if you want to tackle that you can do it in a separate PR. Again, thanks for this improvement!
Right, sure. Did you mean the unit tests though? I believe we already have them - node Tests.js ?
Or was it the linting tests. I'm not sure what's the universal way of doing it. I installed EsLint locally and ran it through the CLI. I'll add instructions for doing both if that's what you're referring to.
Lint tests I meant, we can include the
EsLint
library in the repository and have a command that runs it locally. Additionally, we can have another command that runs UnitTest and Lint test e.g.node Test.js // runs all the unit tests. It already exists. node LintTest // runs all the unit tests. node test // runs Linter + unit tests. We can rename Test.js with a specific name for unit tests.
I think an even better way of doing it would perhaps be having a pre-commit hook that runs the linter before the dev is allowed to commit any code. I think this is better as it rules out the possibility of the dev forgetting to run the linter, as it gets triggered automatically