VSCode snippets for Pester

This topic contains 4 replies, has 2 voices, and was last updated by  The PowerShell Bear 7 months, 2 weeks ago.

  • Author
    Posts
  • #65971

    The PowerShell Bear
    Participant

    I've been playing around with Pester a little the last few days, and also playing around with snippets in VSCode. I did some looking, but couldn't find anyone with snippets for Code, just ones for ISE Steroids.

    Does anyone know of any pre-built pester snippets for VSCode? If not, do you think there would be any interest in someone making some? They look like they'd be really easy to make, and would help people getting started with Pester (not to mention us lazy devs).

  • #65983

    Adam Bertram
    Moderator

    I've got lots of VS Code Pester snippets. Here are some of mine:

  • #65998

    The PowerShell Bear
    Participant

    I love it! I'll give those a shot, and thank you!

  • #66003

    The PowerShell Bear
    Participant

    Huh...as kind of an aside since I'm playing with VS Code snippets (I know, not Pester related), it doesn't look like there's a way to insert a dollar sign literal that it doesn't parse as a tab stop. Maybe I should open a bug/feature request...

  • #66006

    The PowerShell Bear
    Participant

    Nevermind, I figured it out: use a double backslash before the $ does the trick.

You must be logged in to reply to this topic.