-
-
Notifications
You must be signed in to change notification settings - Fork 477
Fix container name in ScriptBlock BeforeAll failures (fixes #2636). #2637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix container name in ScriptBlock BeforeAll failures (fixes #2636). #2637
Conversation
OLD: This PR is still a draft and not yet ready to be merged. There's one test failure that I don't understand. If a maintainer knows the right change here, please feel free to edit.
EDIT: Found the answer; see below. |
I figured out why that one test was failed and made an edit to get it to pass. I think the PR is ready to now. |
Thanks for the PR, can you add more information about the fix, and add a specific test for it? The edit in the current test looks little suspicious, can you explain why it needs to change like this? also putting the Fixes #number directly into the PR description is more helpful, because it will link the PR to the issue, and will close automatically, unlike if you put it in the title 🙂 |
Oh, I thought it worked either way, based on the docs and previous experience: For example, in this case, I think it still linked the issue automatically (see above). Let me know if you want me to change it anyway though. |
400a6e8
to
fd1b9f6
Compare
sure - done |
Sure - here's what this test output would look like for a file:
but here's what it currently looks like for a ScriptBlock:
i.e. it includes the entire code for the ScriptBlock rather than the ScriptBlock's formatted "name". It probably gets really messy if the script block is long. The updated code instead shows it more like a normal file:
Let me know if that helps clarify the motivation for changing the existing test. I think that's net a good change, but let me know if you think otherwise. |
PR Checklist
Create Pull Request
to mark it as a draft. PR can be markedReady for review
when it's ready.Replace Result.Item with Result.Name to handle the ScriptBlock case. Previously, the container name was being reported only for files, not for ScriptBlocks (because files, unlike ScriptBlocks, have Result.Item).