Hi Ally Devs
I’m currently trying to pass Project Numer 5 Backend Apis " File Metadata Microservice
And build this
For the Front
And Express on the Backend
Free code camp test
ther are 2 assertions test that uses DOMprase
I build my app using React
NOTE file API is working as expected
My question is how can I serve this assertion whit React
Have a look at how multer is implemented here versus how it’s implemented in your code.
Unless I’m mistaken, in your React code there isn’t any action for actually sending the file to the back end, only one for setting it in state (not that it matters for the test, just a side note).
Hi Jacques First Thank You for taking the time to replay .
I agree the React state isnt doing noting
I Used it for Exprement on file Handling ,
Think i Will send the page via Express so the DOMTree well be visible to DOMPrase
Ok, hope you were able to resolve the issue with multer that was causing the tests to fail. All the best.
the problem was DOMParser cant parse react-dom
so the test assertion didn’t work
Did a lot to make it happen but finally, it dose
needed to change the root path “/” for the test,
So I created a new home path for React App
and used the root path for the test
I apologize, I couldn’t remember creating a front end for this project so I couldn’t understand why you were messing with front end code to try to pass the tests. In fact, the Github repo provides one in views/index.html. But the instructions do call for a ‘full stack app’, my mistake. Anyway, glad you were able to resolve it.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.