This repository was archived by the owner on Mar 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Make CompareText.tests.ps1 work #37
Open
per-oestergaard
wants to merge
5
commits into
PowerShell:main
Choose a base branch
from
per-oestergaard:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@per-oestergaard please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
@microsoft-github-policy-service agree |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
I am not sure why the tests does not work. It seems to be related to when $TestCases is set and perhaps it is related to Pester v5. Anyway, the tests now work by 'elevating' the $TestCases variables so they are available during the discovery phase.
I also added Import-Module, but that is just because I am not sure how that should fit in. If that is the wrong place, please just delete the line again.
I also snug into .gitignore that is should ignore my .devcontainer. I am working on Ubuntu 22.04 with vscode and thus wanted to isolate the environment in a container.
I did change the casing of
test/TextTableParser.Tests.ps1
to lowercase 'tests' to align with the other files. However, I switched back so the diff can show the changes I made.PR Context
I was planning to create a PR on another issue but before doing so, I wanted to ensure I could run the tests successfully.