Open cohdjn opened 1 year ago
Hi there @cohdjn ,
If you have a source folder like source/Classes
and a ps1 defining a PowerShell class, it will be merged within the PSM1 (that's what ModuleBuilder does, and our associated tasks).
Then the QA will probably look for classes named [fileName] and their corresponding tests...
If that's a dll, the output folder should have the right Classes folder and content in the output folder.
Assuming it's not a PowerShell class, if you still have to have a scriptToProcess, I suggest, calling the folder 'source/scriptToProcess' and update the CopyFolders accordingly. That shouldn't trigger QA, and shouldn't try to merge the content.
@cohdjn did you solve this, and if so I'm curious how?
Problem description
When I add a script to ScriptsToProcess in the module .psd1 file, the QA tests fail to load and error out. If I remove the script from the .psd1, the QA tests work.
The script I have defined is an initialization script to load a class definition.
Verbose logs
How to reproduce
I created a directory called
Classes
beneath thesource
directory and put my .ps1 there with the class definition only. I added my .ps1 to ScriptsToProcess and modifiedbuild.yaml
as follows...CopyPaths:
- en-US
- Classes
- lib
Expected behavior
I expected the QA process to complete without throwing.
Current behavior
None of the QA Pester tests run. I have to remove the entry from ScriptsToProcess and run it by hand manually to have the class loaded for the tests to function.
Suggested solution
I don't have any sadly. I don't have time to troubleshoot.
Operating system the target node is running
PowerShell version and build the target node is running
Module version used