How do you write test cases using Jest?

How do you write test cases using Jest?

In Jest, we utilise the test() function to generate a test case. The first two arguments are a test name string and a handler function. The it() alias can also be used to call the test() method.