Invoke-Pester inside a package?

https://docs.poshtools.com/powershell-pro-tools-documentation/powershell-module/merge-script

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

Example:

  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.