This API manages bags and cuboids. A cuboid is a three-dimensional rectangular box. Each face of a cuboid is a rectangle and adjacent faces meet at right angles. A cube is a cuboid with equal dimensions. A cuboid has a volume that is straightforward to calculate.
A bag is a malleable container with adjustable dimensions, but a fixed volume. The bag can expand to hold any shape or combination of shapes, but the volume of the bag is limited and cannot expand. In our model a bag has many cuboids.
This app has an almost complete test suite.
The tests to update and delete a cuboid are incomplete, your task is to improve them.
The other tests are valid and you must not modify them. In other words, you need to add the missing functionalities so that these tests pass.
You should also take note of the linter and prettier. The linter is currently passing and must pass on completion of the challenge, without any modifications to the config.
Note: The only tests to be modified are tests to update and delete a cuboid. All other tests must remain unchanged.
To participate in this challenge take the following steps:
- Clone this repository.
- Create a private repository of the same name in your personal GitHub account. (Do not fork)
- Add a second remote to your local copy of this repository and push the master branch.
- Checkout a feature branch where you will make your changes.
- Setup the app and get it running. Verify that the linter passes and the test suite fails.
- Implement tests to update and delete a cuboid.
- Add missing functionalities so the other tests pass. Do NOT modify these tests.
- Commit as appropriate as you complete the challenge. (More than one commit is expected)
- Push your committed changes to your repository on your feature branch.
- Create a pull request to the master branch on your repository.
- Invite @bencarle and @mfpiccolo to your private repository.
- Send the link to your pull request to signify the completion of the challenge.
This app uses the following key technologies:
Use nvm
to install the correct version of node:
nvm install
Copy .env.example
to .env
.
cp .env.example .env
Install packages.
npm install
Run the app.
npm run dev
Run the linter.
npm run lint
Run the tests.
npm test