|
| 1 | +// Karma configuration |
| 2 | +// Generated on Wed Oct 11 2017 18:56:07 GMT+0200 (Central European Daylight Time) |
| 3 | + |
| 4 | +module.exports = function(config) { |
| 5 | + config.set({ |
| 6 | + |
| 7 | + // base path that will be used to resolve all patterns (eg. files, exclude) |
| 8 | + basePath: '', |
| 9 | + |
| 10 | + |
| 11 | + // frameworks to use |
| 12 | + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter |
| 13 | + frameworks: ['jasmine', 'karma-typescript'], |
| 14 | + |
| 15 | + |
| 16 | + // list of files / patterns to load in the browser |
| 17 | + files: [ |
| 18 | + 'init-test-bed.spec.ts', |
| 19 | + 'src/**/*.ts' |
| 20 | + ], |
| 21 | + |
| 22 | + |
| 23 | + // list of files to exclude |
| 24 | + exclude: [ |
| 25 | + ], |
| 26 | + |
| 27 | + |
| 28 | + // preprocess matching files before serving them to the browser |
| 29 | + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor |
| 30 | + preprocessors: { |
| 31 | + '**/*.ts': ['karma-typescript'] |
| 32 | + }, |
| 33 | + |
| 34 | + karmaTypescriptConfig: { |
| 35 | + bundlerOptions: { |
| 36 | + entrypoints: /\.spec\.ts$/, |
| 37 | + transforms: [ |
| 38 | + require('karma-typescript-angular2-transform') |
| 39 | + ] |
| 40 | + }, |
| 41 | + compilerOptions: { |
| 42 | + lib: ['ES2015', 'DOM'] |
| 43 | + } |
| 44 | + }, |
| 45 | + |
| 46 | + // test results reporter to use |
| 47 | + // possible values: 'dots', 'progress' |
| 48 | + // available reporters: https://npmjs.org/browse/keyword/karma-reporter |
| 49 | + reporters: ['progress', 'karma-typescript'], |
| 50 | + |
| 51 | + |
| 52 | + // web server port |
| 53 | + port: 9876, |
| 54 | + |
| 55 | + |
| 56 | + // enable / disable colors in the output (reporters and logs) |
| 57 | + colors: true, |
| 58 | + |
| 59 | + |
| 60 | + // level of logging |
| 61 | + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG |
| 62 | + logLevel: config.LOG_INFO, |
| 63 | + |
| 64 | + |
| 65 | + // enable / disable watching file and executing tests whenever any file changes |
| 66 | + autoWatch: true, |
| 67 | + |
| 68 | + |
| 69 | + // start these browsers |
| 70 | + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher |
| 71 | + browsers: ['Chrome'], |
| 72 | + |
| 73 | + |
| 74 | + // Continuous Integration mode |
| 75 | + // if true, Karma captures browsers, runs the tests and exits |
| 76 | + singleRun: false, |
| 77 | + |
| 78 | + // Concurrency level |
| 79 | + // how many browser should be started simultaneous |
| 80 | + concurrency: Infinity |
| 81 | + }) |
| 82 | +} |
0 commit comments