Invoke-Pester inside a package?

Does anyone know how to get Pester to work inside a compiled bundle?


  1. Create c:\temp\myPester.tests.ps1 - add some tests
  2. Create c:\temp\runPester.ps1 - this includes import-module pester and invoke-pester
  3. Compile the script using Merge-Script and make sure to bundle modules.

Run exe, the results is 0 tests ran.

Problem, I cannot . source the test.ps1 files because that runs them and i need to call inovke-pester to get nunit output.