Skip to content

Commit 9e13ea1

Browse files
committed
fixed a typo in the test description and made all the descriptions consise
1 parent babb7ac commit 9e13ea1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sprint-3/2-practice-tdd/get-ordinal-number.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,28 @@ const getOrdinalNumber = require("./get-ordinal-number");
1313
// Case 1: Numbers ending with 1 (but not 11)
1414
// When the number ends with 1, except those ending with 11,
1515
// Then the function should return a string by appending "st" to the number.
16-
test("should append 'st' for numbers ending with 1, except those ending with 11", () => {
16+
test("appends 'st' for numbers ending in 1 except 11", () => {
1717
expect(getOrdinalNumber(1)).toEqual("1st");
1818
expect(getOrdinalNumber(21)).toEqual("21st");
1919
expect(getOrdinalNumber(131)).toEqual("131st");
2020
});
2121

22-
test("should append 'nd' for numbers ending with 2, except those ending with 12", () => {
22+
test("appends 'nd' for numbers ending in 2 except 12", () => {
2323
expect(getOrdinalNumber(2)).toEqual("2nd");
2424
expect(getOrdinalNumber(22)).toEqual("22nd");
2525
expect(getOrdinalNumber(92)).toEqual("92nd");
2626
expect(getOrdinalNumber(132)).toEqual("132nd");
2727
expect(getOrdinalNumber(1142)).toEqual("1142nd");
2828
})
2929

30-
test("should append 'rd' for numbers ending with 3, except those ending with 13", () => {
30+
test("appends 'rd' for numbers ending in 3 except 13", () => {
3131
expect(getOrdinalNumber(3)).toEqual("3rd");
3232
expect(getOrdinalNumber(23)).toEqual("23rd");
3333
expect(getOrdinalNumber(63)).toEqual("63rd");
3434
expect(getOrdinalNumber(533)).toEqual("533rd");
3535
})
3636

37-
test("should append 'th' for numbers ending to any numbers expect (1, 2, 3)", () => {
37+
test("appends 'th' when number does not end in 1, 2, or 3", () => {
3838
expect(getOrdinalNumber(4)).toEqual("4th");
3939
expect(getOrdinalNumber(10)).toEqual("10th");
4040
expect(getOrdinalNumber(14)).toEqual("14th");
@@ -44,7 +44,7 @@ test("should append 'th' for numbers ending to any numbers expect (1, 2, 3)", ()
4444
expect(getOrdinalNumber(670)).toEqual("670th");
4545
})
4646

47-
test("should append 'th' for numbers ending in (11, 12, 13)", () => {
47+
test("appends 'th' for numbers ending in 11, 12, or 13", () => {
4848
expect(getOrdinalNumber(11)).toEqual("11th");
4949
expect(getOrdinalNumber(12)).toEqual("12th");
5050
expect(getOrdinalNumber(13)).toEqual("13th");

0 commit comments

Comments
 (0)