Four-Project Series

TypeScript Integration Testing with Nest Framework you own this product

prerequisites
basic TypeScript • basic Jest
skills learned
use IntelliJ WebStorm to write and execute tests • reproduce hard-to-reach problems using tests • use tests to drive bug fixes • mock S3 containers • dynamically configure Nest.js containers • mock an HTTP service dependency • create in-memory Nest.js applications
Daniel Coleman and Max Guernsey, III
5 weeks · 3-5 hours per week average · INTERMEDIATE

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


You’re a TypeScript developer for a large company that sells stock photography. You’re responsible for the service that ingests images, and it’s been having problems, despite successful unit testing. Working in IntelliJ WebStorm and the Nest framework, you’ll build an integration test that replicates an otherwise unreproducible problem. You’ll also mock an external service to address and prevent problems related to external dependencies. To address problems that only occur when two services are combined, you’ll use integration testing to connect and run the two services together. When you’ve completed this series, you’ll have an integration testing strategy that goes well beyond the capabilities of unit tests for ensuring the stability of your code.

These projects are designed for learning purposes and are not complete, production-ready applications or solutions.

I learned about many technologies I never heard about before and gained new perspectives given by the authors’ experience.

Fernando Bernardino, Senior Software Developer, Wise

liveProject mentor Edward Nguyen shares what he likes about the Manning liveProject platform.

here's what's included

Project 1 Build the Infrastructure

You’re a TypeScript developer for a large company that sells stock photography. You’re responsible for the service that ingests images, and a recent database change has broken the service, despite successful unit testing. Working in IntelliJ WebStorm, you’ll build an integration test that replicates the problem, find the cause, fix the problem, and build the infrastructure to develop more integration tests in the future.

Project 2 Mocking Dependencies

Create an alarm system that warns you before your system breaks. You’re a TypeScript developer for a large company that sells stock photography. You’re responsible for the service that ingests images. A recent upgrade to the image-scaling library has caused a problem with the aspect ratio of thumbnail images. Working in IntelliJ WebStorm, you’ll build a layer of integration tests that replicates the problem and also tests the assumptions that your unit tests rely on. When you’re done, you’ll have an alarm system that warns you when the assumptions your unit tests rely on are no longer valid, preventing problems in the future.

Project 3 External Services

Ensure your system can accommodate even unstable dependency services. You’re a TypeScript developer for a large company that sells stock photography. You’re responsible for the service that ingests images. Unfortunately, the ingestion process is being negatively affected by a flaky external web service that the ingestion engine uses, and the problem is not reproducible in unit testing since there’s no connection to the external service at that time. Working in IntelliJ WebStorm, you’ll establish an in-memory HTTP service, configure it to simulate a dependency service, write a test to reproduce the error, and use the test to build robustness into your system.

Project 4 Connect Two Services

You’re a TypeScript developer for a large company that sells stock photography. You’re responsible for the service that ingests images, and this service depends on another subservice: the pricing microservice. As proven by their individual unit tests, each service works as specified. But when the services are combined, new customers are locked into one pricing table—even those that should have access to pricing that fluctuates depending on factors like promotions, flash sales, and price-tuning. Working in IntelliJ WebStorm, you’ll solve this problem by writing an integration test that connects and runs the two services together, letting you reproduce the problem locally.

book resources

When you start each of the projects in this series, you'll get full access to the following book for 90 days.

choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • TypeScript Integration Testing with Nest Framework project for free

project authors

Daniel Coleman

Daniel Coleman has been writing software since he was twelve years old, and has been getting paid for it for the last ten years. He quickly progressed from individual contributor to trailblazer for software design excellence, turning his teammates into fellow disciples of high quality. Dan has also worked as an embedded coach for teams, helping them perfect their craft through best practices for code design, test-driven development, behavior-driven development, and effective requirements management. He shares his thoughts on the industry and software design at agiledesign.io.

Max Guernsey, III

Max Guernsey has over twenty years of experience in software development and is currently a managing member at DevCraft LLC. He has worked on a wide range of products and technologies, including C++ class libraries, financial analysis applications, C# and Java backends, and even multi-platform video games. He is an experienced consultant and his "coaching from the keyboard" approach provides hands-on experience to learners in all aspects of modern software development.

Prerequisites

This liveProject series is for developers with a beginner-level understanding of TypeScript and object-oriented design. To begin these liveProjects you’ll need to be familiar with the following:

TOOLS
  • IntelliJ WebStorm
  • Basic TypeScript
  • Nest.js
  • Basic Jest
  • Supertest
  • SQLite
TECHNIQUES
  • Integration testing
  • Test-driven development (TDD)

you will learn

In this liveProject series, you’ll learn to build and apply integration tests that go beyond the capabilities of unit tests for finding and preventing problems.

  • Use IntelliJ WebStorm to write and execute tests
  • Reproduce problems in hard-to-reach parts of a system with tests
  • Use tests to drive bug fixes
  • Inspect the results of service execution, use SQLite and an in-memory database
  • Mock S3 containers
  • Dynamically configure Nest.js containers
  • Mock an HTTP service dependency
  • Reproduce "ghost in the machine" problems with integration tests
  • Create in-memory Nest.js applications

features

Self-paced
You choose the schedule and decide how much time to invest as you build your project.
Project roadmap
Each project is divided into several achievable steps.
Get Help
While within the liveProject platform, get help from other participants and our expert mentors.
Compare with others
For each step, compare your deliverable to the solutions by the author and other participants.
book resources
Get full access to select books for 90 days. Permanent access to excerpts from Manning products are also included, as well as references to other resources.