I have included all the scenarios user can manipulate the input and included the scenarios mentioned in the challenge as well.
The test command will write output to output.xml for better understanding and visibility.
(Remove --reporter=junit --outputFile=output.xml from vitest command to show output on terminal)