Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

zeal-2004
Copy link

@zeal-2004 zeal-2004 commented May 24, 2025

Open in Gitpod know more

A PR for adding the algorithm and tests for Project-Euler Problem 29.

Vitest has been successfully carried passing all test cases.

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new JavaScript files are placed inside an existing directory.
  • All filenames should use the UpperCamelCase (PascalCase) style. There should be no spaces in filenames.
    Example:UserProfile.js is allowed but userprofile.js,Userprofile.js,user-Profile.js,userProfile.js are not
  • All new algorithms have a URL in their comments that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.88%. Comparing base (1d252d7) to head (47e3ef4).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1776      +/-   ##
==========================================
+ Coverage   85.87%   85.88%   +0.01%     
==========================================
  Files         377      378       +1     
  Lines       19720    19737      +17     
  Branches     3005     3010       +5     
==========================================
+ Hits        16935    16952      +17     
  Misses       2785     2785              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

it('should throw error when number is negative', () => {
expect(() => distinctPowers(-3)).toThrowError('Power out of scope')
})
test('if the number is greater than or equal to 2', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use it rather than test?

Copy link
Author

Choose a reason for hiding this comment

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

I'm sorry, I don't understand your question. Could you be more specific?

Copy link
Contributor

Choose a reason for hiding this comment

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

I see a couple usages of it(...) and now a couple using test(...). So I wondered why the different usage?

Copy link
Author

Choose a reason for hiding this comment

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

I referred to other test files for different questions while writing this code and they had this format. I have followed the same as per the documentation.

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.

3 participants