在PhpStorm/WebStorm中运行单一业力测试

在PhpStorm/WebStorm中运行单一业力测试,phpstorm,karma-runner,webstorm,Phpstorm,Karma Runner,Webstorm,我正在使用PhpStorm,希望为我的*.ts运行业力测试 这是我的karma.config.js // Karma configuration // Generated on Mon Jan 16 2017 13:32:24 GMT+0100 (Środkowoeuropejski czas stand.) var webpackConfig = require('./webpack.config.js'); var webpack = require('webpack'); module.

我正在使用PhpStorm,希望为我的*.ts运行业力测试

这是我的
karma.config.js

// Karma configuration
// Generated on Mon Jan 16 2017 13:32:24 GMT+0100 (Środkowoeuropejski czas stand.)
var webpackConfig = require('./webpack.config.js');
var webpack = require('webpack');

module.exports = function (config) {
    config.set({
        basePath: '',
        frameworks: ['mocha', 'chai', 'sinon', 'fixture'],
        files: [
            'spec/**/*.spec.ts',
            'spec/fixtures/**/*.html',
        ],
        exclude: [],
        webpack: {
            module: webpackConfig.module,
            resolve: webpackConfig.resolve,
            plugins: [
                new webpack.ProvidePlugin({
                    $: "jquery",
                    jQuery: "jquery",
                    "window.jQuery": "jquery",
                    Tether: 'tether',
                    "window.Tether": 'tether'
                })
            ],
        },
        preprocessors: {
            "spec/**/*.ts": ['webpack'],
            'spec/**/*.html': ['html2js'],
            'spec/**/*.json': ['json_fixtures']
        },
        reporters: ['progress'],
        port: 9876,
        colors: true,
        logLevel: config.LOG_INFO,
        autoWatch: true,
        browsers: ['PhantomJS'],//, 'Chrome'],
        singleRun: false,
        concurrency: Infinity
    })
};
我的Karma“运行/调试配置”运行良好-所有测试都已执行。但我希望通过右键单击test来运行单个测试(如PHPUnit)

截图:

但我有一个错误:

我做错了什么-如何在PhpStorm中使用单一测试?

已解决: 我必须安装
npmi--save dev ts node