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 function to count and find problems with missing tests #96

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

raiman264
Copy link
Contributor

What was added

An output to the console when you run all the tests so you can see how many problems are there and if there is any missing Test

Thanks to this I figured out that 2 of the test files had wrong naming

example output:
Screenshot 2024-10-11 at 9 06 21 p m

Checklist before requesting a review

  • I have checked the guide for contributions.
  • I have added the description at the top of the solution file.
  • I have added a test file for the problem.
  • I have added an entry to the README file with a link to the new file.
  • I have run linter (npx eslint LeetcodeProblems LeetcodeProblemsTests) and unit tests (node Test.js) and they pass. More info.

Check the guide and this PR example.

Copy link
Owner

@ignacio-chiazzo ignacio-chiazzo left a comment

Choose a reason for hiding this comment

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

Love it! Thanks!

Test.js Outdated
return problems;
};

const test_all = async function () {
Copy link
Owner

Choose a reason for hiding this comment

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

Could you rename the following functions?

  • test_all -> runAllTests
  • solve -> solveProblem

Also, let's use camelCase everywhere. I noticed we have a mix. A linter rule could solve this too (not need to do it here).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated all variables and functions in this file to be camelCase
I also added the eslint rule to make it visible and noticed there are a lot of issues

I can create another PR to solve all of those linter issues

Copy link
Owner

Choose a reason for hiding this comment

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

Love it! that'd be amazing.

Test.js Outdated Show resolved Hide resolved
Copy link
Owner

@ignacio-chiazzo ignacio-chiazzo left a comment

Choose a reason for hiding this comment

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

Nice! thank you.

Screenshot 2024-10-15 at 7 34 46 PM

@ignacio-chiazzo ignacio-chiazzo merged commit 96a9cfd into ignacio-chiazzo:master Oct 15, 2024
1 check passed
@raiman264 raiman264 deleted the find-missing-tests branch October 16, 2024 14:49
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