/

To Mock or Not to Mock: Node.js Testing Strategies

Copy Link

Unlock This Lesson

26

min

To Mock or Not to Mock: Node.js Testing Strategies

To Mock or Not to Mock: Node.js Testing Strategies

To Mock or Not to Mock: Node.js Testing Strategies

To Mock or Not to Mock: Node.js Testing Strategies

publish date

Jun 8, 2022

duration

26

min

Difficulty

Intermediate

Beginner

Beginner

Beginner

Case details

For many Node.js developers, mocking is a big part of unit testing. This enables testing of smaller portions of logic with minimal overhead in a predictable situation. This talk will discuss different strategies for mocking in unit tests and include examples from popular mocking libraries like `proxyquire` and `nock`. It will also talk about common problems and mishaps like over-mocking or alternatively, not mocking enough, when values that change over time.

Share case:

Questions?

Chat with Us!

910 Foulk Road, Suite 201

Wilmington, DE 19803, USA

© 2025 Geekle. All rights reserved.

Questions?

Chat with Us!

910 Foulk Road, Suite 201

Wilmington, DE 19803, USA

© 2025 Geekle. All rights reserved.

Questions?

Chat with Us!

910 Foulk Road, Suite 201

Wilmington, DE 19803, USA

© 2025 Geekle. All rights reserved.

Questions?

Chat with Us!

910 Foulk Road, Suite 201

Wilmington, DE 19803, USA

© 2025 Geekle. All rights reserved.