diff --git a/karma-live-data.conf.js b/karma-live-data.conf.js index cb420e48fc..4d2d777bac 100644 --- a/karma-live-data.conf.js +++ b/karma-live-data.conf.js @@ -1,45 +1,16 @@ -process.env.CHROME_BIN = require('puppeteer').executablePath(); +// import settings from default config file +let properties = null; +const originalConfigFn = require('./karma.conf.js'); +originalConfigFn({ + set: function (arg) { + properties = arg; + }, +}); +// pass `--grep '[live data]'` to mocha to only run live data tests +properties.client.args = ['--grep', '[live data]]']; + +// export settings module.exports = function (config) { - config.set({ - frameworks: ['mocha', 'karma-typescript'], - files: ['src/lib/**/*.ts', 'src/proto/**/*.ts'], - preprocessors: { - '**/*.ts': ['karma-typescript'], - }, - plugins: [ - require('karma-mocha'), - require('karma-typescript'), - require('karma-chrome-launcher'), - ], - reporters: ['progress', 'karma-typescript'], - browsers: ['ChromeHeadless'], - singleRun: true, - client: { - mocha: { - timeout: 6000, // Default is 2s - }, - args: ['--grep', '[live data]]'], - }, - karmaTypescriptConfig: { - bundlerOptions: { - entrypoints: /^.*[^(node)]\.spec\.ts$/, - }, - coverageOptions: { - instrumentation: false, - }, - tsconfig: './tsconfig.json', - compilerOptions: { - noEmit: false, - }, - include: { - mode: 'replace', - values: ['src/lib/**/*.ts', 'src/proto/**/*.ts'], - }, - exclude: { - mode: 'replace', - values: ['node_modules/**'], - }, - }, - }); + config.set(properties); };