Jest-then
The problem
"describe" and "it" are great, but they don't really speak and guide your thinking during the testing process. Jest-then provides new keywords to help give your tests meaning and differentiate between the Arrange Act Assert part of each test.
What does it look like ?
Feature `A user can sign-in`,
Available keywords
Note, you can still use their full api. meaning you can use
xscenario
orscenario.only
as you would withdescribe
orit
😇
Keyword | Alias for |
---|---|
Scenario | describe |
Feature | describe |
Case | describe |
Given | beforeEach |
When | beforeEach |
Then | test/it |
And | test/it |
But what if jest changes
Under the hood, this thing uses javascript proxies. I only delegate to the original jest object so you're safe 🥳