Skip to content

Commit 0c993de

Browse files
committed
Update test file
1 parent 0ae927f commit 0c993de

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

exercises/practice/luhn/luhn.spec.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ describe('Luhn', () => {
3434
expect(valid('1 2345 6789 1234 5678 9012')).toEqual(false);
3535
});
3636

37+
xtest('invalid long number with a remainder divisible by 5', () => {
38+
expect(valid('1 2345 6789 1234 5678 9013')).toEqual(false);
39+
});
40+
3741
xtest('valid number with an even number of digits', () => {
3842
expect(valid('095 245 88')).toEqual(true);
3943
});
@@ -66,11 +70,23 @@ describe('Luhn', () => {
6670
expect(valid('091')).toEqual(true);
6771
});
6872

73+
xtest('very long input is valid', () => {
74+
expect(valid('9999999999 9999999999 9999999999 9999999999')).toEqual(true);
75+
});
76+
77+
xtest('valid luhn with an odd number of digits and non zero first digit', () => {
78+
expect(valid('109')).toEqual(true);
79+
});
80+
6981
xtest("using ascii value for non-doubled non-digit isn't allowed", () => {
7082
expect(valid('055b 444 285')).toEqual(false);
7183
});
7284

7385
xtest("using ascii value for doubled non-digit isn't allowed", () => {
7486
expect(valid(':9')).toEqual(false);
7587
});
88+
89+
xtest("non-numeric, non-space char in the middle with a sum that's divisible by 10 isn't allowed", () => {
90+
expect(valid('59%59')).toEqual(false);
91+
});
7692
});

0 commit comments

Comments
 (0)