Create a movie DB API that consumes another API (mock API) and transforms it's results.
- Create an endpoint
/:movieName/oldnesswhich should return valuesNEW|90s|OLDbased on the release date of the movie.- Year >= 2000 : NEW
- Year >= 90 : 90s
- Year < 90 : OLD
- Create and endpoint
/:movieName/profitablewhich should return valuesPROFITABLE|NONPROFITABLEbased on the budget and made. - Extend the
/:movieName/profitableendpoint by adding aBLOCKBUSTERresponse type if the difference between budget and made is greater than 100. - Create an endpoint
/:movieName/ratingthat returns the rating of the movie out of 5, given the mock server returns the rating out of 10.
- Use
vitestfor testing. - Use
mswfor mocking the API. - Use
supertestfor testing the API.
npm run testnpm run test:e2e