Getting Started
The Test Utils library is your gateway to efficient and effective testing practices in development. It provides an array of functionalities tailored for the modern testing landscape, leveraging containers for database and service emulation.
Quick Installation
Start by adding Test Utils to your project with yarn:
yarn add @softkit/test-utils
Key Features
- Database Management: Use
startPostgres
to configure a PostgreSQL container, tailored for realistic testing scenarios. - Redis Server Setup: Employ
startRedis
to initialize a Redis container, ensuring your tests have access to a fast, in-memory data store. - Local AWS Simulation: With
startLocalstack
, replicate AWS services locally to test without incurring cloud costs. - Enhanced Assertions: Benefit from additional Jest assertions, such as
expectNotNullAndGet
, to make your tests more expressive and comprehensive.
Next Steps
Now that you have integrated the Test Utils library into your project, you're ready to dive deeper into its functionalities:
-
Explore Features: Learn about the extensive features of the Test Utils library by reading the Features Documentation. Understand how to leverage database management, Redis setup, local AWS simulation, and more to enhance your testing workflow.
-
Container Testing: For detailed information on using containers to emulate databases and services, proceed to the Test Containers Documentation. This guide will provide you with all the necessary information to simulate complex service interactions and data stores efficiently.