File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ # These tests are runs as part of the deployment process to ensure the newly published module is working as expected.
2+ # These tests run against the installed module, not the source code, so they do not use mocks and are more of a real-world test.
3+ # Since mocks are not used, we must be careful to not rely on state stored on the machine, such as a module Configuration file.
4+ # To run these tests on your local machine, see the comments in the BeforeAll block.
5+
6+ BeforeAll {
7+ Import-Module - Name YourModuleName - Force
8+
9+ # To run these tests on your local machine, comment out the Import-Module command above and uncomment the one below.
10+ # Do this to use the module version from source code, not the installed version.
11+ # This is necessary to test functionality that you've added to the module, but have not yet published and installed.
12+ # Import-Module "$PSScriptRoot\..\src\YourModuleName" -Force
13+ }
14+
15+ Describe ' Get-HelloWorld' {
16+ It ' Should return "Hello, World!"' {
17+ $expected = ' Hello, World!*'
18+ $result = Get-HelloWorld
19+ $result | Should - BeLike $expected
20+ }
21+ }
You can’t perform that action at this time.
0 commit comments