Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AnujChhikara committed Jan 3, 2025
1 parent 8f6d981 commit 0390355
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
16 changes: 8 additions & 8 deletions test/integration/progressesTasks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,20 +518,20 @@ describe("Test Progress Updates API for Tasks", function () {
});

describe("GET /progresses (getPaginatedProgressDocument)", function () {
let userId;
let taskObject1;
let taskId1;

beforeEach(async function () {
userId = await addUser(userData[1]);
taskObject1 = await tasks.updateTask(taskData[0]);
taskId1 = taskObject1.taskId;
const userId = await addUser(userData[1]);
const taskObject1 = await tasks.updateTask(taskData[0]);
const taskId1 = taskObject1.taskId;
const progressData1 = stubbedModelTaskProgressData(userId, taskId1, 1683626400000, 1683590400000); // 2023-05-09
const progressData2 = stubbedModelTaskProgressData(userId, taskId1, 1683885600000, 1683849600000); // 2023-05-12
await firestore.collection("progresses").doc("taskProgressDocument1").set(progressData1);
await firestore.collection("progresses").doc("taskProgressDocument2").set(progressData2);
});

afterEach(async function () {
await cleanDb();
});

it("should return paginated results when dev=true is passed", function (done) {
chai
.request(app)
Expand Down Expand Up @@ -618,7 +618,7 @@ describe("Test Progress Updates API for Tasks", function () {
.end((_err, res) => {
expect(res).to.have.status(400);
expect(res.body).to.be.an("object");
expect(res.body.message).to.equal("size must be in range 1-100");
expect(res.body.message).to.equal("size must be in the range 1-100");
return done();
});
});
Expand Down
13 changes: 7 additions & 6 deletions test/integration/progressesUsers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,18 +422,19 @@ describe("Test Progress Updates API for Users", function () {
});

describe("GET /progresses (getPaginatedProgressDocument)", function () {
let userId1;
let userId2;

beforeEach(async function () {
userId1 = await addUser(userData[0]);
userId2 = await addUser(userData[1]);
const userId1 = await addUser(userData[0]);
const userId2 = await addUser(userData[1]);
const progressData1 = stubbedModelProgressData(userId1, 1683957764140, 1683936000000);
const progressData2 = stubbedModelProgressData(userId2, 1683957764140, 1683936000000);
await firestore.collection("progresses").doc("progressDoc1").set(progressData1);
await firestore.collection("progresses").doc("progressDoc2").set(progressData2);
});

afterEach(async function () {
await cleanDb();
});

it("should return paginated results when dev=true is passed", function (done) {
chai
.request(app)
Expand Down Expand Up @@ -490,7 +491,7 @@ describe("Test Progress Updates API for Users", function () {
.end((_err, res) => {
expect(res).to.have.status(400);
expect(res.body).to.be.an("object");
expect(res.body.message).to.equal("size must be in range 1-100");
expect(res.body.message).to.equal("size must be in the range 1-100");
return done();
});
});
Expand Down

0 comments on commit 0390355

Please sign in to comment.