| module.exports = function(config) { |
| config.set({ |
| |
| // frameworks to use |
| // available frameworks: https://npmjs.org/browse/keyword/karma-adapter |
| frameworks: ['jasmine'], |
| |
| |
| // list of files / patterns to load in the browser |
| files: [ |
| { pattern: 'npm-wasm/bin/test/pathkit.wasm', included:false, served:true}, |
| { pattern: 'tests/*.json', included:false, served:true}, |
| 'tests/testReporter.js', |
| 'npm-wasm/bin/test/pathkit.js', |
| 'tests/*.spec.js' |
| ], |
| |
| proxies: { |
| "/pathkit/": "/base/npm-wasm/bin/test/" |
| }, |
| |
| // test results reporter to use |
| // possible values: 'dots', 'progress' |
| // available reporters: https://npmjs.org/browse/keyword/karma-reporter |
| reporters: ['progress'], |
| |
| // web server port |
| port: 4444, |
| |
| // 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, |
| |
| browserDisconnectTimeout: 15000, |
| browserNoActivityTimeout: 15000, |
| |
| // start these browsers |
| // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher |
| browsers: ['ChromeHeadlessNoSandbox'], |
| customLaunchers: { |
| ChromeHeadlessNoSandbox: { |
| base: 'ChromeHeadless', |
| flags: [ |
| // Without this flag, we see an error: |
| // Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted |
| '--no-sandbox' |
| ] |
| } |
| }, |
| |
| // 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, |
| }) |
| } |