Skip to content

Commit 8852d66

Browse files
committed
Readme now contains information on how to run tests
1 parent 7ced716 commit 8852d66

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/tests/backup/
2+
/tests/test-log.txt

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# JEnv for Windows Version 2 is here.
33
### A complete rewrite of V.1
4-
## change your current Java version with 3 words
4+
## Change your current Java version with 3 words
55

66
- JEnv allows you to change your current JDK Version.
77
- This is helpful for testing or if you have projects requiring
@@ -61,4 +61,13 @@ An additional parameter to the PowerShell script was added. "--output" alias "-o
6161

6262
![SystemEnvironmentVariablesHirachyShell](https://user-images.githubusercontent.com/55546882/130204196-1a800310-4454-49bd-8d80-161b0e7cca3f.PNG)
6363

64-
![SystemEnvironmentVariablesHirachyPowerShell PNG](https://user-images.githubusercontent.com/55546882/130204185-b54368cc-34db-40d1-a707-4c5477ca236b.PNG)
64+
![SystemEnvironmentVariablesHirachyPowerShell PNG](https://user-images.githubusercontent.com/55546882/130204185-b54368cc-34db-40d1-a707-4c5477ca236b.PNG)
65+
66+
## Contributing
67+
If you want to contribute feel free to do so. This is a great repository for beginners as the amount of code is not huge and you can understand how it works pretty easily.
68+
For running tests I suggest you to use the latest version of powershell (pwsh.exe):
69+
https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.2
70+
Be careful you have to run it as pwsh and not as powershell
71+
Then you have to install Pester. This is only for tests: `Install-Module -Name Pester -Force -SkipPublisherCheck`
72+
You could use your already installed powershell as well. However it has an old Pester Module already installed which you can not use and I could not figure out how it can be updated: https://github.com/pester/Pester/issues/1201
73+
Navigate into the test folder and run the `test.ps1` file. It will backup your env vars and your jenv config while testing and automatically restore them later. But you should always let the tests finish else your vars and config wont be restored

0 commit comments

Comments
 (0)