Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garystafford/b101304b19b92a02d36f to your computer and use it in GitHub Desktop.
Save garystafford/b101304b19b92a02d36f to your computer and use it in GitHub Desktop.
Code snippet for blog post, Retrieving Data with AngularJS and the MEAN Stack: http://wp.me/p1RD28-16F. Set Karma's browser for running tests. See complete project at: https://github.com/garystafford/meanstack-data-samples
// Karma configuration
module.exports = function (config) {
// Determines Karma's browser choice based on environment
var testBrowser = 'Chrome'; // Default browser
if (process.env.NODE_ENV === 'travis') {
testBrowser = 'PhantomJS'; // Must use for headless CI (Travis-CI)
}
console.log("Karma browser: " + testBrowser);
...
// Start these browsers, currently available:
// Chrome, ChromeCanary, Firefox, Opera,
// Safari (only Mac), PhantomJS, IE (only Windows)
browsers: [testBrowser],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment