๐ Purpose of this project is to act as reference ๐ for all kind of unit test setups written in Jest test framework
We encourage AAA(Arrange - Act - Assert) format for structuring any unit(actually any!) test.
Note: These setups are just some of the possible to write. I agree that, for the same test, one can write with many different setups also.
Visit each folder and you should find a brief description about the test scenario and test setup.
-
Install dependencies
yarn
-
Run tests
yarn test
-
Run a single test
yarn test anonymous-instance-mock/caller.spec.ts