Skip to content

Add LuhnAlgorithm.js and LuhnAlgorithm.test.js in Maths folder #1768

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

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: fixed error at idInvalidCardCompanies function test
  • Loading branch information
HD-40307g authored and HD-40307g committed Dec 20, 2024
commit 4141a381b970a7c438f4043d9c9ff91596fb8bb1
3 changes: 2 additions & 1 deletion Maths/test/LuhnAlgorithm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ describe('Luhn Algorithm Tests', () => {

test('should return an empty array if no invalid cards are found', () => {
const validCards = [valid1, valid2, valid3, valid4, valid5];
const companies = idInvalidCardCompanies(validCards);
const invalidCards = findInvalidCards(validCards); // Ensure only invalid cards are processed
const companies = idInvalidCardCompanies(invalidCards);
expect(companies).toEqual([]);
});

Expand Down
Loading