jest assert if empty array 1

jest assert if empty array

expect(expected).toEqual([])

Here is what the above code is Doing:
1. We’re creating a new list called expected.
2. We’re calling the function get_all_links with the argument “http://xkcd.com”.
3. We’re checking to see if the value returned by get_all_links is the same as expected.

Similar Posts