Skip to content
Snippets Groups Projects
Select Git revision
  • 71438c2e4b7bf0af5eb10e5591fbb4f03010330b
  • main default protected
  • renovate/lock-file-maintenance
  • demo protected
  • person-select-custom
  • dbp-translation-component
  • icon-set-mapping
  • port-i18next-parser
  • remove-sentry
  • favorites-and-recent-files
  • revert-6c632dc6
  • lit2
  • advertisement
  • wc-part
  • automagic
  • publish
  • wip-cleanup
  • demo-file-handling
18 results

karma.common.conf.js

Blame
  • Christoph Reiter's avatar
    Reiter, Christoph authored
    karma is looking for the chromium exedcutable, but the playwright one is still
    called "chrome". I didn't noticed this because it would fall back to the debian install
    chromium instance then.
    6c5c8263
    History
    karma.common.conf.js 1.01 KiB
    module.exports = async function(config) {
      const { installBrowsersForNpmInstall, registry } = require('playwright-core/lib/server');
      await installBrowsersForNpmInstall(["firefox", "chromium"]);
      process.env.FIREFOX_BIN = registry.findExecutable("firefox").executablePath();
      process.env.CHROMIUM_BIN = registry.findExecutable("chromium").executablePath();
    
      config.set({
        basePath: 'dist',
        frameworks: ['mocha'],
        client: {
          mocha: {
            ui: 'tdd',
            timeout: 2000 * (process.env.CI === undefined ? 1 : 10)
          },
        },
        files: [
          {pattern: './*.js', included: true, watched: true, served: true, type: 'module'},
          {pattern: './**/*', included: false, watched: true, served: true},
        ],
        autoWatch: true,
        browsers: [
          'ChromiumHeadlessNoSandbox',
          'FirefoxHeadless',
        ],
        customLaunchers: {
          ChromiumHeadlessNoSandbox: {
            base: 'ChromiumHeadless',
            flags: ['--no-sandbox']
          }
        },
        singleRun: false,
        logLevel: config.LOG_ERROR
      });
    }