I have passed every test except the following: You can send a GET request to /api/issues/{projectname} for an array of all issues for that specific projectname.
With the ouput:
{
“_id”: “66c5d18b36199c1772b1917d”,
“assigned_to”: “”,
“status_text”: “”,
“open”: true,
“issue_title”: “Mr”,
“issue_text”: “Donjo”,
“created_by”: “Wondimu”,
“created_on”: “2024-08-21T11:37:47.173Z”,
“updated_on”: “2024-08-21T11:37:47.173Z”,
“__v”: 0
}
I don’t know what else to do
Without being able to pull up your project page, I can only try to make this assumption:
The output you provided is an object:
Looking at this instruction:
I would suggest looking at how you are returning data. If you need to return multiple issues for the same project how are you structuring those issues?
Are you returning an array with each issue inside it like:
Ohh…andadditionally, the error that keeps on coming is the following:
[Error: expected [ { …(10) }, { …(10) }, …(3) ] to have a length of 3 but got 5].
Whenever I’m submitting my work, the ‘5’ increases to ‘17’, then to 28 and so on. I’m guessing somewhere in my code, whenever the tests are being performed, additional issues are being added to my project.
Its hard to say exactly what is going on here still. I know it wont be the solution, but have you tried dumping all of the previous records for your issue tracker database and run the tests again? With a fresh database, if you create two new issues for a project and perform a GET request to view the issues, are you getting the two expected records in return?
When you update a record with new data, are you verifying that its not creating a new record altogether? Double check that your ‘created_on’ and ‘updated_on’ fields are different after an Issue Update.