Karma, Typescript definition file not loading : <p>I am working on setting up development environment with karma, webpack and typescript, But I am having an issue with karma not applying custom definition file on tests.</p>

<p>This is my project file structure:</p>

<pre><code>// file structure
project/
    config/
        karma.conf.js
    tests/
        test-files.ts 
        ...        
    src/
        tsdefinitions.d.ts
        other-ts-files.ts
        ...
    tsconfig.json
</code></pre>

<p>And here is karma config part related to webpack and typescript</p>

<pre><code>webpack: {
  devtool: 'eval-source-map',
  resolve: {
    extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js']
  },
  module: {
    loaders: [{
      test: /\.tsx?$/,
      loader: 'awesome-typescript-loader'
    }]
  }
},
webpackMiddleware: {stats: 'errors-only'},
mime: {'text/x-typescript': ['ts','tsx']},
basePath: '../',
files: [{
  pattern: './test/**/*.ts',
  watched: false
}],
preprocessors: {
  './test/**/*.ts': ['webpack', 'sourcemap']
}
</code></pre>

<p>And lastly tsconfig.json </p>

<pre><code>{
  "compilerOptions": {
    "removeComments": true,
    "allowSyntheticDefaultImports": true,
    "baseUrl": "./",
    "sourceMap": true,
    "noImplicitAny": true,
    "allowJs": true,
    "module": "commonjs",
    "target": "es2015",
    "paths": {
      "jquery": ["node_modules/jquery/dist/jquery"]
    },
    "exclude": ["node_modules"],
    "files": [
      "src/**/*.ts"
    ]
  },
  "awesomeTypescriptLoaderOptions": {
    "useCache": false,
    "useBabel": true,
    "babelOptions": {
      "presets": [
        "es2015",
        "stage-0"
      ]
    }
  }
}
</code></pre>

<p>I am running karma test like this </p>

<pre><code>./node_modules/.bin/karma start ./config/karma.conf.js
</code></pre>

<p>Now when I am just building project files using karma everything is ok, they are built with no errors.</p>

<p>But when I am running test build there's a lot of errors of missing Window interface properties that are declared inside tsdefinitions.d.ts file.</p>
