Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.