The solution includes a cinema ticket booking service with the capability to handle multiple ticket types (Adult, Child, Infant), enforce purchase rules, and provide testing with Jest.
-
Clone the repository:
git clone `repo link` cd repo-name
-
Install dependencies: npm install
-
Run the Jest test suite to verify the working of the solution: npm jest
In the jest test file test/TicketServeTest.test.js I have already defined 13 test cases which I believe are the important one. Please feel free to edit existing test cases and add new of your own choice.
Initially, I designed a basic flow of the solution with the help of class diagram. which is also uploaded along with the repo.