Any ideas why the module is not found during the tests?

In karma.conf.js I've specified all the dependencies under the files property i.e angular , angular-mocks

But I have a feeling that app.component.ts and main.ts are not being compiled hence why they're not being found?

karma.conf.js

var webpackConfig = require('./webpack.test.config'); module.exports = function(config) { 'use strict'; var _config = { basePath: '', frameworks: ['jasmine', 'karma-typescript'], files: [ 'node_modules/angular/angular.js', 'node_modules/angular-mocks/angular-mocks.js', 'src/app/app.component.ts', 'src/main.ts', { pattern: 'src/app/**/*.+(ts|html)' } ], preprocessors: { '**/*.ts': ['karma-typescript'] }, webpack: webpackConfig, karmaTypescriptConfig: { bundlerOptions: { entrypoints: /\.spec\.ts$/ }, compilerOptions: { lib: ['ES2015', 'DOM'] } }, reporters: ['progress', 'karma-typescript'], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['Chrome'], singleRun: true }; config.set(_config); };

webpack.test.config.js

var webpack = require('webpack'); var path = require('path'); module.exports = { devtool: 'inline-source-map', resolve: { extensions: ['.ts', '.js'] }, module: { rules: [{ test: /\.ts$/, loaders: [{ loader: 'awesome-typescript-loader', options: { configFileName: path.join(__dirname, 'src', 'tsconfig.json') } }] }, { test: /\.html$/, loader: 'html-loader' } ] } };

app.component.spec.ts

import { AppComponent } from './app.component'; describe('Component: AppComponent', () => { let Users; beforeEach(function() { angular.mock.module('myapp'); }); beforeEach(inject(function(_Users_: any) { console.log(_Users_); })); });

app.component.ts

export class AppComponent implements ng.IComponentOptions { static registeredName = 'dummy'; template: any; constructor() { this.template = require('./app.component.html'); } }

main.ts