Giter VIP home page Giter VIP logo

Comments (8)

ziesemer avatar ziesemer commented on August 24, 2024 2

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.

ziesemer avatar ziesemer commented on August 24, 2024 1

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.

JustinGrote avatar JustinGrote commented on August 24, 2024 1

@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.

JustinGrote avatar JustinGrote commented on August 24, 2024 1

@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.

JustinGrote avatar JustinGrote commented on August 24, 2024 1

Glad to hear, will close but can reopen if a test case comes up that doesnt work.

from vscode-adapter.

iRon7 avatar iRon7 commented on August 24, 2024 1

@JustinGrote,

@iRon7 Can you test with the latest prerelease?

Confirmed: prerelease version v2023.6.2 works fine now.
Thanks for the efforts

from vscode-adapter.

iRon7 avatar iRon7 commented on August 24, 2024

@JustinGrote,

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.

iRon7 avatar iRon7 commented on August 24, 2024

@JustinGrote,

Can you test with the latest prerelease?

I will try to find sometime this coming weekend.

from vscode-adapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.