Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
1. General summary of the issue
When using a module of type "Manifest", InModuleScope gives error "Module 'MyModule' is not a Script module.". This looks to have been fixed previously in #933 but has been re-introduced.
The workaround is to add an empty psm1 file as the
RootModulein the manifest. This causes the module to be loaded as aScripttype instead.2. Describe Your Environment
3. Expected Behavior
InModuleScope should work with manifest module types.
4.Current Behavior
InModuleScope causes an error with manifest module types.
5. Possible Solution
Add support for manifest module types to https://github.com/pester/Pester/blob/master/Functions/InModuleScope.ps1#L72
6. Context
Had to use a workaround for manifest module types of adding an empty file as the root module. All other functionality seems to remain consistent.