Skip to content

Commit 2be0512

Browse files
updated tests descriptions
1 parent 55f0ccc commit 2be0512

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

Sprint-3/4-stretch/card-validator.test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,37 @@ test("should return false if the number is more than 16 digits long", () => {
1414

1515

1616

17-
test("all digits must be numbers",()=>{
17+
test("should return true if all digits are numbers",()=>{
1818
expect(validateNumber(1036294650361848)).toEqual(true)
1919
})
20-
test("all digits must be numbers", () => {
20+
test("should return false if one or more of the digits aren't numbers", () => {
2121
expect(validateNumber("103629465036184a")).toEqual(false);
2222
});
2323

2424

2525

26-
test("all the digits can not be the same",()=>{
26+
test("should return true if at least one of the digits isn't the same as the others",()=>{
2727
expect(validateNumber(3636363636363636)).toEqual(true)
2828
})
29-
test("all the digits can not be the same", () => {
29+
test("should return true if at least one of the digits isn't the same as the others", () => {
3030
expect(validateNumber(3333333333333336)).toEqual(true);
3131
});
32-
test("all the digits can not be the same", () => {
32+
test("should return false if at least one of the digits isn't different from all the others", () => {
3333
expect(validateNumber(2222222222222222)).toEqual(false);
3434
});
3535

3636

37-
test("the final digit must be even",()=>{
37+
test("should return true if the final digit is even",()=>{
3838
expect(validateNumber(1528056378293456)).toEqual(true)
3939
})
40-
test("the final digit must be even", () => {
40+
test("should return false if the final digit isn't even", () => {
4141
expect(validateNumber(1528056378293457)).toEqual(false);
4242
});
4343

4444

45-
test("the sum of all digits must be greater than 16",()=>{
45+
test("should return true if the sum of all digits is greater than 16",()=>{
4646
expect(validateNumber(1903647295628592)).toEqual(true)
4747
})
48-
test("the sum of all digits must be greater than 16", () => {
48+
test("should return false if the sum of all the digits isn't greater than 16", () => {
4949
expect(validateNumber(1000100000000002)).toEqual(false);
5050
});

0 commit comments

Comments
 (0)