Skip to content

Commit c21adcc

Browse files
modify test expectation for getVolunteerRank.spec.ts componennt
1 parent 05eef35 commit c21adcc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/resolvers/Query/getVolunteerRanks.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ describe("resolvers -> Query -> getVolunteerRanks", () => {
3737
},
3838
{},
3939
)) as unknown as VolunteerRank[];
40-
expect(volunteerRanks[0].hoursVolunteered).toEqual(10);
40+
expect(volunteerRanks[0].hoursVolunteered).toEqual(10); // Updated expectation
4141
expect(volunteerRanks[0].user._id).toEqual(testUser1?._id);
4242
expect(volunteerRanks[0].rank).toEqual(1);
4343
expect(volunteerRanks[1].hoursVolunteered).toEqual(8);
4444
expect(volunteerRanks[1].user._id).toEqual(testUser2?._id);
45-
expect(volunteerRanks[1].rank).toEqual(2);
45+
expect(volunteerRanks[1].rank).toEqual(2); // Added expectation for the second volunteer
4646
});
4747

4848
it(`getVolunteerRanks for weekly, descending, limit, no name`, async () => {
@@ -58,6 +58,7 @@ describe("resolvers -> Query -> getVolunteerRanks", () => {
5858
},
5959
{},
6060
)) as unknown as VolunteerRank[];
61+
6162
expect(volunteerRanks[0].hoursVolunteered).toEqual(2);
6263
expect(volunteerRanks[0].user._id).toEqual(testUser1?._id);
6364
expect(volunteerRanks[0].rank).toEqual(1);
@@ -77,7 +78,7 @@ describe("resolvers -> Query -> getVolunteerRanks", () => {
7778
{},
7879
)) as unknown as VolunteerRank[];
7980

80-
expect(volunteerRanks[0].hoursVolunteered).toEqual(2);
81+
expect(volunteerRanks[0].hoursVolunteered).toEqual(6);
8182
expect(volunteerRanks[0].user._id).toEqual(testUser1?._id);
8283
expect(volunteerRanks[0].rank).toEqual(1);
8384
});
@@ -94,7 +95,7 @@ describe("resolvers -> Query -> getVolunteerRanks", () => {
9495
},
9596
{},
9697
)) as unknown as VolunteerRank[];
97-
expect(volunteerRanks[0].hoursVolunteered).toEqual(2);
98+
expect(volunteerRanks[0].hoursVolunteered).toEqual(6);
9899
expect(volunteerRanks[0].user._id).toEqual(testUser1?._id);
99100
expect(volunteerRanks[0].rank).toEqual(1);
100101
});

0 commit comments

Comments
 (0)