Member-only story
My Discovery Journey with Jest: test() vs it()
This post was originally published on my blog.
Have you ever wondered or confused about test() and it() in Jest framework?
Introduction
Personally, I have been using it() for quite some time. Recently, a thought of “Why both of test() and it() exists when they did the same job?” flashed through my mind. Thus, I decided to write this post and share some of my findings.
Journey of Discovery
Verifying The Truth
I have been told that it() and test() is behaving the same way and I decided to verify it. After some searching and read through the Jest documentation. The documentation says:
Also under the alias: it(name, fn, timeout)
Although the documentation already speaks for it, I decided to go straight to Jest repo and navigate through the source code.
Finally, this piece of code tells me that both it() and test() is the same as they are using the same interface, ItConcurrent.

