|
| 1 | +// Karma configuration |
| 2 | +// Generated on Fri Feb 17 2017 15:57:25 GMT+0800 (中国标准时间) |
| 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 | + // frameworks to use |
| 11 | + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter |
| 12 | + frameworks: ['jasmine','commonjs'], |
| 13 | + |
| 14 | + // list of files patterns to load in the browser |
| 15 | + files: [ //include:false为不包含这些文件到浏览器中 |
| 16 | + |
| 17 | + //Legacy |
| 18 | + {pattern:'src/Legacy/libs/SuperMap_Basic-8.1.1-14426.js',include:false}, |
| 19 | + {pattern:'src/Legacy/libs/SuperMap_IServer-8.1.1-14426.js',include:false}, |
| 20 | + {pattern:'src/Legacy/libs/Lang/*.js',include:false}, |
| 21 | + {pattern:'src/Legacy/theme/default/*.js',include:false}, |
| 22 | + {pattern:'src/Legacy/theme/default/*.css',include:false}, |
| 23 | + |
| 24 | + //Core |
| 25 | + 'src/Core/base.js', |
| 26 | + {pattern:'src/Core/**/*.js',include:false}, |
| 27 | + |
| 28 | + //test |
| 29 | + {pattern:'test/**/*Spec.js',include:false}, |
| 30 | + 'test/js/test-main.js' |
| 31 | + ], |
| 32 | + |
| 33 | + |
| 34 | + // list of files to exclude |
| 35 | + exclude: [], |
| 36 | + |
| 37 | + |
| 38 | + // preprocess matching files before serving them to the browser |
| 39 | + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor |
| 40 | + preprocessors: { |
| 41 | + 'src/Legacy/libs/SuperMap_Basic-8.1.1-14426.js':['commonjs'], |
| 42 | + 'src/Legacy/libs/SuperMap_IServer-8.1.1-14426.js':['commonjs'], |
| 43 | + 'src/Legacy/libs/Lang/*.js':['commonjs'], |
| 44 | + 'src/Legacy/theme/default/*.js':['commonjs'], |
| 45 | + 'src/Core/base.js':['commonjs'], |
| 46 | + 'src/Core/**/*.js':['commonjs'], |
| 47 | + 'src/Core/iServer/*.js':['commonjs',"coverage"], |
| 48 | + 'test/**/*Spec.js': ['commonjs',] |
| 49 | + }, |
| 50 | + |
| 51 | + |
| 52 | + // test results reporter to use |
| 53 | + // possible values: 'dots', 'progress' |
| 54 | + // available reporters: https://npmjs.org/browse/keyword/karma-reporter |
| 55 | + reporters: ['progress','coverage'], |
| 56 | + |
| 57 | + coverageReporter: { |
| 58 | + type:'html', |
| 59 | + dir: 'testCoverage/' |
| 60 | + }, |
| 61 | + |
| 62 | + |
| 63 | + // web server port |
| 64 | + port: 9876, |
| 65 | + |
| 66 | + |
| 67 | + // enable / disable colors in the output (reporters and logs) |
| 68 | + colors: true, |
| 69 | + |
| 70 | + |
| 71 | + // level of logging |
| 72 | + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG |
| 73 | + logLevel: config.LOG_INFO, |
| 74 | + |
| 75 | + |
| 76 | + // enable / disable watching file and executing tests whenever any file changes |
| 77 | + autoWatch: true, |
| 78 | + |
| 79 | + |
| 80 | + // start these browsers |
| 81 | + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher |
| 82 | + browsers: ['Chrome'], |
| 83 | + |
| 84 | + |
| 85 | + // Continuous Integration mode |
| 86 | + // if true, Karma captures browsers, runs the tests and exits |
| 87 | + singleRun: false, |
| 88 | + |
| 89 | + // Concurrency level |
| 90 | + // how many browser should be started simultaneous |
| 91 | + concurrency: Infinity |
| 92 | + }) |
| 93 | +} |
0 commit comments