Skip to content

keriati/ts-spec-generator

 
 

Repository files navigation

TypeScript Test File Generator for WebStorm

This is a plugin for WebStorm or IntelliJ that adds an action to create test file and open in instantly.

  • The test files will be created next to the target file in the __tests__ folder.
  • The test file will have the name pattern: *.test.ts

Installation

Download the JAR file from Releases and select the Install From File option in the Settings Panel of Plugins inside WebStorm.

Usage

In the Code menu press Create TypeScript test file or use the Action panel (Cmd+Shift+a).

Configuration

The generated template can be changed in Settings > Languages & Frameworks > TypeScript Test File Generator.

Example template:

import { $ClassName$ } from '../$ClassName$';

describe('$ClassName$', () => {
    it('', () => {
        new $ClassName$();
    });
});