diff options
Diffstat (limited to '.config/karma.conf.js')
-rw-r--r-- | .config/karma.conf.js | 58 |
1 files changed, 42 insertions, 16 deletions
diff --git a/.config/karma.conf.js b/.config/karma.conf.js index 660c1d2..67667c7 100644 --- a/.config/karma.conf.js +++ b/.config/karma.conf.js @@ -1,5 +1,4 @@ // Karma configuration - const karmaCommon = require('./karma.conf.common.js') let chromeBin = 'ChromeHeadless' @@ -20,30 +19,52 @@ if (process.platform === 'linux') { module.exports = function (config) { config.set( Object.assign(karmaCommon(config), { + files: [ + 'spec/RAFPlugin.js', + { + pattern: 'spec/fixtures/fixture.css', + included: false, + served: true + }, + { + pattern: 'spec/fixtures/pixel.png', + included: false, + served: true + }, + { + pattern: 'src/**/*.js', + included: false, + served: true, + type: 'modules' + }, + { + pattern: 'spec/helpers.js', + included: false, + served: true, + type: 'module' + }, + { + pattern: 'spec/setupBrowser.js', + included: true, + type: 'module' + }, + { + pattern: 'spec/spec/*/**/*.js', + included: true, + type: 'module' + } + ], + // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { - 'dist/svg.js': ['coverage'] + 'src/**/*.js': ['coverage'] }, - // this specifies which plugins karma should load - // by default all karma plugins, starting with `karma-` will load - // so if you are really puzzled why something isn't working, then comment - // out plugins: [] - it's here to make karma load faster - // get possible karma plugins by `ls node_modules | grep 'karma-*'` - plugins: [ - 'karma-chrome-launcher', - 'karma-coverage', - 'karma-firefox-launcher', - 'karma-jasmine' - ], - // test results reporter to use // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/karma-reporter reporters: ['progress', 'coverage'], - - // configure the coverage reporter coverageReporter: { // Specify a reporter type. type: 'lcov', @@ -51,6 +72,11 @@ module.exports = function (config) { subdir: function (browser) { // normalization process to keep a consistent browser name accross different OS return browser.toLowerCase().split(/[ /-]/)[0] // output the results into: './coverage/firefox/' + }, + instrumenterOptions: { + istanbul: { + esModules: true + } } }, |