Comments (8)
From my perspective - both with the minimal test case included above, and with the tests that I've previously referenced at https://github.com/ziesemer/ad-privileged-audit/ - this is now working perfectly in the pre-release (v2023.6.1). Thank you!
from vscode-adapter.
This is unfortunately more than just an inconvenience. I spent many hours trying to figure out why my tests were not working within the VSC Adapter but were otherwise working with Invoke-Pester
. Please consider that any code being sourced to place under test that includes setting strict mode will cause the tests to fail within VSC.
Here is a minimal test case:
BeforeAll {
Set-StrictMode -Version Latest
}
Describe 'Tests' {
It 'Should-Pass' {
# This test should pass.
}
}
from vscode-adapter.
@iRon7 understood, I was just explaining why it is this way today, but I certainly underestimated the number of people using strictmode (as well as didn't think it would even matter due to the nature of how pesterinterface works).
from vscode-adapter.
@iRon7 Can you test with the latest prerelease? I've run strict mode both in the Extension Terminal and in the standalone runner and your minimal test case now works fine.
from vscode-adapter.
Glad to hear, will close but can reopen if a test case comes up that doesnt work.
from vscode-adapter.
@iRon7 Can you test with the latest prerelease?
Confirmed: prerelease version v2023.6.2
works fine now.
Thanks for the efforts
from vscode-adapter.
Thanks for linking this case.
as strictmode doesn't really provide much benefit other than a lot more annoying runtime errors
I don't fully agree with this statement as it has helped me quiet some time with revealing simple typo's. Besides (just) for my tests I prefer to be as strict as possible as others who do use my scripts might have this simply switched on (as what in fact happens here)...
from vscode-adapter.
Can you test with the latest prerelease?
I will try to find sometime this coming weekend.
from vscode-adapter.
Related Issues (20)
- Implement Refresh and Stop APIs
- Fails to run or complete discovery under Windows PowerShell 5 HOT 3
- Cancel button does not show up when refresh is running HOT 1
- Update to use CreateOutputChannel with specific language ID API HOT 1
- RuntimeException: '-HaveParameter' is not a valid Should operator. HOT 2
- Virtual File Support and "hot editing" via scriptblock entry into Pester
- Import-PrivateModule : ハッシュ リテラルが不完全です。 HOT 19
- Unexpected token errors when running any test HOT 7
- Multi-Workspace Support
- Don't ask again option in disable codelens notification doesn't work HOT 2
- Syntax Errors in Tests should be more clear in summary
- Make separate run profiles for PowerShell and Windows PowerShell
- Shore up Supported Run Scenarios
- Refresh Button Broken in 2023.7.5
- Cannot index into a null array while using -ForEach HOT 10
- Throwing exception when using `pester.pesterModulePath` and when there are no Pester in `$PSModulePath` HOT 1
- variable expansion not working in BeforeAll or BeforeEach blocks HOT 5
- Nested Context can cause tests results to display incorrectly HOT 2
- Feature Request: Add runtime parameters to tests HOT 1
- Path not found if non-ASCII characters are included. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-adapter.