sometimes we only want to test a single file or debug it selectively and running the whole test suit can be very time consuming in these scenarios.
the following script can be added to the package.json
of an application and ease this process:
"test-file": "read -p 'input test file: ' name && npm test -- $name"
the above script will ask for the filename to be input and then it will pass it on to the appropriate test runner.