In this lesson, we’ll explore a powerful technique that goes beyond testing functions solely from the main.rs file. Currently, our testing landscape involves importing functions into main.rs to assess their functionality. What if we want to streamline the process and directly test functions within the file where they’re written? Let’s see how we can do that.

Get hands-on with 1400+ tech skills courses.