MethodsAndPractices / vsteam

PowerShell module for accessing Azure DevOps Services and Azure DevOps Server (formerly VSTS or TFS)
https://methodsandpractices.github.io/vsteam-docs/
MIT License
447 stars 155 forks source link

fix #531 when Version is not set in Set-VSTeamAccount #532

Closed mnieto closed 1 year ago

mnieto commented 1 year ago

PR Summary

fix #531 when Version is not set in Set-VSTeamAccount

PR Checklist

SebastianSchuetze commented 1 year ago

Can you explain what happens if the vsteam module is already set and it's still overwritten.

I am thinking to start to write unit tests for the psm1 with Pester. This seems to get more complicated. So I think we should test the import part as well.

SebastianSchuetze commented 1 year ago

Ah I see the issue

mnieto commented 1 year ago

I am thinking to start to write unit tests for the psm1 with Pester. This seems to get more complicated. So I think we should test the import part as well.

Yes, I agree I don't have experience enough with Pester. .psm1 files are complex to test. Perhaps we can move most of the functionality to an internal testable function and keep the psm1 file as much simple as possible

SebastianSchuetze commented 1 year ago

There is a recommendation:

https://pester.dev/docs/usage/modules

Testing the functions would be fine but also testing the import on different OS itself would also be important. I have done this at work but I got it from an example on github. I need to check.

SebastianSchuetze commented 1 year ago

Found it: https://powershellexplained.com/2017-01-21-powershell-module-continious-delivery-pipeline/#psm1-module