123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- /*
- * Password Management Servlets (PWM)
- * http://www.pwm-project.org
- *
- * Copyright (c) 2006-2009 Novell, Inc.
- * Copyright (c) 2009-2018 The PWM Project
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
- var webpack = require('webpack');
- var webpackConfig = require('../webpack.test.js');
- var path = require("path");
- var os = require('os');
- module.exports = function (config) {
- config.set({
- // base path that will be used to resolve all patterns (eg. files, exclude)
- basePath: '..',
- // frameworks to use
- // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
- frameworks: [ 'jasmine' ],
- // list of files / patterns to load in the browser
- files: [
- 'karma-test-suite.ts'
- ],
- exclude: [],
- // preprocess matching files before serving them to the browser
- // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
- preprocessors: {
- "**/*.ts": ["webpack", "sourcemap"]
- },
- // fix typescript serving video/mp2t mime type
- mime: {
- 'text/x-typescript': ['ts', 'tsx']
- },
- webpack: {
- resolve: webpackConfig.resolve,
- module: webpackConfig.module,
- plugins: [
- // Without this, we're not able to debug our tests in the browser:
- new webpack.SourceMapDevToolPlugin({
- filename: null, // if no value is provided the sourcemap is inlined
- test: /\.(ts|js)($|\?)/i // process .js and .ts files only
- })
- ]
- },
- webpackMiddleware: {
- // display no info to console (only warnings and errors)
- noInfo: true,
- stats: {
- colors: true
- }
- },
- // test results reporter to use
- // possible values: 'dots', 'progress'
- // available reporters: https://npmjs.org/browse/keyword/karma-reporter
- reporters: ['kjhtml', 'spec'],
- // web server port
- port: 9876,
- // enable / disable colors in the output (reporters and logs)
- colors: true,
- // level of logging
- // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
- logLevel: config.LOG_INFO,
- // enable / disable watching file and executing tests whenever any file changes
- autoWatch: true,
- // start these browsers
- // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
- browsers: ['Chrome_with_debug_plugins'],
- // Provides the ability to install plugins in Chrome (such as JetBrains debugger), and have them stick around
- // between launches:
- customLaunchers: {
- Chrome_with_debug_plugins: {
- base: 'Chrome',
- chromeDataDir: path.resolve(os.homedir(), '.karma/customLaunchers/Chrome_with_debug_plugins')
- }
- },
- // Continuous Integration mode
- // if true, Karma captures browsers, runs the tests and exits
- singleRun: false,
- // Concurrency level
- // how many browser should be started simultaneous
- concurrency: Infinity
- })
- };
|