TDD Fundamentals

Hey coders! I was wondering if anyone can help me with some guidance as I feel lesson doesn’t really explain what is happening very well. I rather do the instruction and pass the steps without much knowing what has actually happened.

Introduction

I was asked to type npm start (npm test in the following exercise) and hit enter. Assuming it runs the pre-writen code within the user-visits-index-test.js , how does npm know which code to run as I don’t see anywhere defined start or test