// Karma configuration
// Generated on Mon Nov 30 2015 02:58:44 GMT+0500 (RTZ 4 (зима))
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
frameworks: ['jspm','jasmine'],
plugins:[
"karma-jspm",
'karma-jasmine',
'karma-chrome-launcher',
'karma-jasmine-html-reporter'
],
jspm: {
config: "./config-jspm-karma.js",
loadFiles: ['src/test.ts'],
packages: "jspm/"
} ,
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress','html'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultanous
concurrency: Infinity
})
}
For first look all is well, but when i try to launch it in karma - i catch following:
Chrome 46.0.2490 (Windows 10 0.0.0) ERROR: 'Potentially unhandled rejection [6]
Error: XHR error (404 Not Found) loading http://localhost:9876/base/jspm/github/frankwallis/plugin-typescript@2.2.3
at error (http://localhost:9876/base/jspm/system.src.js?6536115be64e0ff966e
5546f7767676fa7c03d6:1020:16)
at XMLHttpRequest.xhr.onreadystatechange (http://localhost:9876/base/jspm/s
stem.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:1028:13)'
I have assured that http://localhost:9876/base/jspm/github/frankwallis/plugin-typescript@2.2.3/utils.js is accessible for example and not completly understand why it trys to load whole plugin.
I try to do following: Project structure:
Expected:
And project is tested with JSPM/SystemJS loader and from source, scripted in TypeScript without precompile
In .config-jspm-karma.js :
In ./karma.conf.js
For first look all is well, but when i try to launch it in karma - i catch following:
I have post this at https://github.com/frankwallis/plugin-typescript/issues/64 while i'm not sure what does provide this error exactly.
I have assured that
http://localhost:9876/base/jspm/github/frankwallis/plugin-typescript@2.2.3/utils.js
is accessible for example and not completly understand why it trys to load whole plugin.