Sam Landfried

Testing in Node - Testing with a Database (Part 1)

Sam Landfried | Feb 04, 2019

Testing code creates more reliable and maintainable applications. Testing a complex app with multiple dependencies can be, well, complex. A common dependency that needs to be managed in a test environment is a database. In this screencast, you’ll learn how to incorporate a database into your tests to increase their value.

After this screencast, you'll be able to:

- Test parts of your application that rely on records existing in your database.
- Use root-level lifecycle hooks in Mocha to improve control of test execution.
- Write meaningful integration tests.

Familiarity with Node.js, testing fundamentals, and package managers (npm or yarn) is recommended.

For the More Curious...

BNR Guide to Front-End Web Development
Full Stack Courses

Subscribers Only

Transcripts are for subscribers. Create an account today to access our collection of screencasts, skill packs, and more.

Subscribers Only

Project files are only available for subscribers. Create an account today to access our collection of screencasts, skill packs, and more.

Need Help?

If you get stuck, try starting a discussion with Big Nerd Ranch experts in the community tab.

Skill Pack

This screencast is part of a skill pack called Testing in Node.

Related Screencasts

Explore other screencasts related to this topic.