Skip to content

Instantly share code, notes, and snippets.

@benbrandt
Created September 27, 2017 16:07
Show Gist options
  • Save benbrandt/62081b6d2187a3278b3e646db314a3e0 to your computer and use it in GitHub Desktop.
Save benbrandt/62081b6d2187a3278b3e646db314a3e0 to your computer and use it in GitHub Desktop.
require("phantomjs-polyfill");
require("karma-es6-shim");
process.env.TZ = "America/Los_Angeles";
var path = require("path");
var webpackConfig = require("./webpack.config.karma");
var entry = path.resolve(webpackConfig.context, webpackConfig.entry.app);
var testManifest = path.resolve(webpackConfig.context, "./test-manifest.js");
var preprocessors = {};
preprocessors[entry] = ["webpack"];
preprocessors[testManifest] = ["webpack"];
module.exports = function(config) {
config.set({
autoWatch: true,
basePath: "../",
frameworks: ["jasmine", "es6-shim"],
ngHtml2JsPreprocessor: {
stripPrefix: "src/",
moduleName: "templates"
},
files: ["gettysburg/node_modules/phantomjs-polyfill/bind-polyfill.js", entry, testManifest],
webpack: webpackConfig,
exclude: [],
port: 8080,
browsers: ["PhantomJS"],
plugins: [
require("karma-webpack"),
"karma-es6-shim",
"karma-phantomjs-launcher",
"karma-jasmine",
"karma-ng-html2js-preprocessor"
],
preprocessors: preprocessors,
reporters: ["progress"],
singleRun: true,
colors: true,
logLevel: config.LOG_INFO
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment