Sam Landfried

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

Sam Landfried | Feb 04, 2019

Creating database entities for tests quickly becomes unmanageable as data models become more complex. Factory Girl allows us to quickly create records in our database that easily grow with our application. In this screencast, you’ll learn how to use Factory Girl to create maintainable tests that are easy to grow with your data model.

After this screencast, you'll be able to:

- Define database model factories with Factory Girl.
- Quickly create individual or multiple models in the database using Factory Girl.
- Use Factory Girl to clean up test records added to the database.

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.