Author Posts

July 19, 2018 at 2:14 pm

Hi all,
I'm just starting to learn Pester and I'm curious how to keep my test scripts separate from my Private/Public functions. I have a Private, Public, Test folder to keep everything in its own directory. Running New-Fixture creates the script file and script.test file in the same directory. I'm wondering how others keep their test directory separate from the function directories. Primarily how to are you setting the pathing in your *.test.ps1 files.

\--- Module
    \--- Private
    \--- Public
         \--- Do-Something.ps1
    \--- Test
         \--- Do.Something.test.ps1
    \--- Module.psd1
    \--- Module.psm1


	
			
	

July 19, 2018 at 7:13 pm

Six of one, half dozen of another. New-TestFramework takes a pretty one-size-fits-all approach; you can (obviously) modify what it produces and set it up however you like. That said, I've not run across anyone separating private/public functions in that way before, but having a /Test(s) folder is obviously pretty standard.