Exercise 3: Why GetSquareTests.ps1 Isn't Discovered — Possible Solution ==================================================================== WHY IT'S MISSED ------------------------------ Per this chapter's own warn-box, Pester's test discovery specifically looks for files ending in the exact suffix ".Tests.ps1" - note the literal dot immediately before "Tests." GetSquareTests.ps1 is missing that dot (it reads "...SquareTests.ps1," not "...Square.Tests.ps1"), so it doesn't match the exact naming pattern Pester's discovery mechanism is looking for. When Invoke-Pester is run against a folder with no explicit -Path pointing directly at that one file, it only picks up files matching the *.Tests.ps1 pattern precisely - GetSquareTests.ps1 is silently skipped entirely, not flagged as an error or a warning. WHY THIS IS A REAL, LOAD-BEARING CONVENTION ------------------------------ Per this chapter, this naming convention isn't a style preference - it's how Pester's automatic discovery actually decides which files in a folder contain tests at all. A file that would work perfectly fine if pointed at directly and explicitly, via -Path, still gets skipped during folder-wide automatic discovery purely because its filename doesn't match the required pattern. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly identifies the missing dot before "Tests" as the specific reason the filename doesn't match Pester's required *.Tests.ps1 pattern, and correctly explains that this causes the file to be silently skipped during automatic folder-wide discovery rather than causing any visible error.