2020-05-19
3466
#jest#js libraries#nestjs
Maciej Cieślar
18691
May 19, 2020 ⋅ 12 min read

Unit testing NestJS applications with Jest

Maciej Cieślar A JavaScript developer and a blogger at mcieslar.com.

Recent posts:

Solid Principles For Javascript

SOLID principles for JavaScript

SOLID principles help us keep code flexible. In this article, we’ll examine all of those principles and their implementation using JavaScript.

Frank Joseph
Dec 5, 2024 ⋅ 10 min read
Master JavaScript Date And Time: From Moment.js To Temporal

Master JavaScript date and time: From Moment.js to Temporal

JavaScript’s Date API has many limitations. Explore alternative libraries like Moment.js, date-fns, and the new Temporal API.

Yan Sun
Dec 4, 2024 ⋅ 9 min read
Npm Vs. Npx: What’s The Difference?

npm vs. npx: What’s the difference?

Explore use cases for using npm vs. npx such as long-term dependency management or temporary tasks and running packages on the fly.

Fimber Elemuwa
Dec 3, 2024 ⋅ 5 min read
How To Audit And Validate AI-Generated Code Output

How to audit and validate AI-generated code output

Validating and auditing AI-generated code reduces code errors and ensures that code is compliant.

Boemo Mmopelwa
Dec 2, 2024 ⋅ 5 min read
View all posts

6 Replies to "Unit testing NestJS applications with Jest"

  1. I don’t seem to have the .of method on my entity class. I see you use Playlist.of to create an object to test against. What am I missing?

  2. About the Playlist.of method yet, lets say we extend Playlist from a BaseEntity, could we implement it there? If so, how would we deal with the types? Thanks

  3. This is a great article and would have been better if there was a sample Github repository to see all the code examples at once.

  4. This is a great article to know the concept of testing, and how to do it with the nest.
    It helps me a lot to do testing.
    Thank you so much for sharing your knowledge.

Leave a Reply