Doing testing in Angular? If not, you should be. And if you are, and you’re using Jasmine, you probably get tired of writing the same stuff every time.

Luckily, there’s a nice VSCode extension that dumps typical test snippets for you to fill in. Want a new ‘it’? Type ‘testit’, hit enter, and you’re in business.

  it(`should description`, () => {
      // Arrange
      
      // Act
      
      // Assert
      
  });

Love it.

Grab it here or through the VSCode extension browser

Installation

  1. Install Visual Studio Code 0.10.1 or higher
  2. Launch Code
  3. From the command palette Ctrl-Shift-P (Windows, Linux) or Cmd-Shift-P (OSX)
  4. Select Install Extension
  5. Choose the extension
  6. Reload Visual Studio Code