Using Jest to Test the Command Line Tool

I have an application that provides a script command as a command. How to test this script with a joke. More specifically, how to execute this script with a joke and then apply the appropriate expectations? The script does not export any functions, it just contains a bunch of lines of code that are executed sequentially.

+5
source share

Source: https://habr.com/ru/post/1259819/


All Articles