rollbar
Version:
Effortlessly track and debug errors in your JavaScript applications with Rollbar. This package includes advanced error tracking features and an intuitive interface to help you identify and fix issues more quickly.
92 lines (75 loc) • 2.29 kB
JavaScript
const path = require('path');
const webpack = require('webpack');
const defaults = require('./defaults');
const defaultsPlugin = new webpack.DefinePlugin(defaults);
module.exports = function (config) {
config.set({
browsers: ['ChromeHeadless'],
// The Travis environment has these specified.
// To run BrowserStack tests locally, specify the environment variables:
// BROWSER_STACK_USERNAME, BROWSER_STACK_ACCESS_KEY
browserStack: {
username: null,
accessKey: null,
},
client: {
captureConsole: true,
},
// Files are specified in the grunt-karma configuration in Gruntfile.js
//files: []
frameworks: ['mocha', 'expect', 'chai', 'sinon', 'jquery-1.9.0'],
logLevel: 'INFO',
// Default is 1000 but we can run into rate limit issues so bump it up to 10k
pollingTimeout: 10000,
// run the bundle through the webpack and sourcemap plugins
preprocessors: {
'test/**/!(requirejs).test.js': ['webpack', 'sourcemap'],
'**/*.html': ['html2js'],
},
proxies: {
'/dist/': '/base/dist/',
'/examples/': '/base/examples/',
},
customHeaders: [
// Allow CSP error testing, but leave enough enabled so that karma
// can still run correctly.
{
match: '\\.html',
name: 'Content-Security-Policy',
value: "default-src 'self' 'unsafe-inline' 'unsafe-eval';",
},
],
reporters: ['progress'],
singleRun: true,
// Use "polling" and JSONP for older browsers
transports: ['polling'],
forceJSONP: true,
webpack: {
plugins: [defaultsPlugin],
devtool: 'inline-source-map',
performance: { hints: false },
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: [/node_modules/, /vendor/, /lib/, /dist/, /test/],
},
{
test: /(mootootls|requirejs)\.js$/,
loader: 'script',
},
{
enforce: 'post',
test: /\.js$/,
exclude: [/node_modules/, /vendor/, /lib/, /dist/, /test/],
loader: 'coverage-istanbul-loader',
},
],
},
},
webpackMiddleware: {
noInfo: true,
},
});
};