/// <reference path='../thirdparty/jasmine/jasmine.d.ts'/>
/// <reference path= '../thirdparty/angular/angular.d.ts'/>
import {common} from './modules/common/Common.module';
var app:ng.Imodule= angular.module('comp', [common.name]);
/// <reference path='../thirdparty/jasmine/jasmine.d.ts'/>
/// <reference path= '../thirdparty/angular/angular.d.ts'/>
import {comp} from './app';
export function main() {
describe('comp', function () {
it('Comp should be defined', function () {
expect(comp).toBeDefined();
});
});
}
module.exports = function (config) {
config.set({
frameworks: ['jasmine'],
basePath: '',
preprocessors: {
'app/app.ts': ['typescript'],
'app/app.test.ts': ['typescript']
},
typescriptPreprocessor: {
typings: [
'thirdparty/jasmine/jasmine.d.ts',
'node_modules/typescript/typescript.d.ts',
'thirdparty/angular/angular.d.ts',
'thirdparty/jquery/src/jquery.d.ts'
],
options: {
sourceMap: false,
target: 'ES5',
module: 'commonjs',
noImplicitAny: true,
noResolve: true,
removeComments: true,
concatinateOutput: false
},
},
files: [
'app/modules/**/*.module.ts',
'app/app.ts',
'app/app.test.ts',
'node_modules/requirejs/require.js'
],
exclude: [
'modules/**/e2e_test/**',
'app/**/e2e/**/*.js',
'thirdparty/pioneer/featureFlag/**/*{t,T}est.js',
'app/Templates.ts',
'app/routes.ts',
'app/ThirdpartyTemplates.ts'
],
browsers: ['Chrome'],
reporters: ['spec', 'junit'],
specReporter: { maxLogLines: 5 },
junitReporter: {
outputFile: './build/work/jasmine/TEST-results.xml',
suite: 'COMP'
},
port: 9876
});
};
running the test throws error saying that unexpected token import and cannot import app. Not sure whats is wrong. Did some one came across this issue? Can some point where is the mistake.
Here is my angular module,
app.ts:
app.test.ts:
Karma.config.ts
running the test throws error saying that unexpected token import and cannot import app. Not sure whats is wrong. Did some one came across this issue? Can some point where is the mistake.