
Sign up to save your podcasts
Or


Bart Busschots taught us the basics of Jest last time for our Test Driven Development environment. This week we learn to group our tests using the `describe()` function in Jest. Grouping tests with describe does more than eliminate the need to comment our code, it also provides more useful output from our tests and scopes what happens inside.
As Bart describes it, we climb "Mount Jest" at one point as he explains how we can also loop our tests (instead of repeating code as we did last time) using `describe.each()()`. It's a little head bending with arrays of arrays and functions of functions but it sounds worse to describe than it actually is to read and create.
He then describes ways to run certain setup and tear down functions before and after our tests are run and why we might need to do that.
Finally, we get the last cool thing we'll need to understand about Jest, and that's how to use the `.only` and `.skip` modifiers on our tests so that we can focus on individual tests while we're chasing bugs.
For the first time in a long time, he even gives us an optional challenge to flex these new Jest muscles.
You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.
By Allison Sheridan4.8
99 ratings
Bart Busschots taught us the basics of Jest last time for our Test Driven Development environment. This week we learn to group our tests using the `describe()` function in Jest. Grouping tests with describe does more than eliminate the need to comment our code, it also provides more useful output from our tests and scopes what happens inside.
As Bart describes it, we climb "Mount Jest" at one point as he explains how we can also loop our tests (instead of repeating code as we did last time) using `describe.each()()`. It's a little head bending with arrays of arrays and functions of functions but it sounds worse to describe than it actually is to read and create.
He then describes ways to run certain setup and tear down functions before and after our tests are run and why we might need to do that.
Finally, we get the last cool thing we'll need to understand about Jest, and that's how to use the `.only` and `.skip` modifiers on our tests so that we can focus on individual tests while we're chasing bugs.
For the first time in a long time, he even gives us an optional challenge to flex these new Jest muscles.
You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

836 Listeners

164 Listeners

1,288 Listeners

250 Listeners

33 Listeners

20 Listeners

902 Listeners

568 Listeners

21 Listeners

47 Listeners

77 Listeners

1,219 Listeners

176 Listeners

30 Listeners

15 Listeners

38 Listeners