Additional Globals
Explore the tools that Jest provides to help write and run our tests as efficiently as possible.
We'll cover the following...
Looking deeper into Jest globals
To help with writing and running our tests efficiently, Jest provides several additional globals that we can use. These globals allow us to do things like iterate over test cases and run only the test we are working on.
Additional functionality of describe
-
describe.each(table)(name, fn, timeout)
helps to abstract repetitive testing logic that just needs to be run with multiple data sets. The
tableargument is an array of arrays representing the data to pass to the anonymous function (
fn`) ...