Skip to content

Instantly share code, notes, and snippets.

@nadnoslen
Last active November 16, 2017 18:35
Show Gist options
  • Save nadnoslen/eba344704af8fa88a138c7a079d1d1f5 to your computer and use it in GitHub Desktop.
Save nadnoslen/eba344704af8fa88a138c7a079d1d1f5 to your computer and use it in GitHub Desktop.
Ember-2.x testem.js Headless Configuration
/*jshint node:true*/
/**
* I'd suggest removing any old testem.json files in the root of your
* Ember application.
*
* With this configuration, your tests will run in Chrome by default.
*
* To run your tests in headless (FASTER) mode (launch_in_ci):
* `ember t`
*
* To run your tests with the browser test-page summary (launch_in_dev):
* `ember t -s`
*
*/
const isHeadless = !process.argv.includes('-s');
let options = {
framework: 'qunit',
test_page: 'tests/index.html?hidepassed&nocontainer&notifications',
disable_watching: true,
/**
* `ember t` runs the `launch_in_ci` mode
*/
launch_in_ci: [
'Chrome'
// add more browsers here if you really want to e.g. 'Firefox'
],
/**
* Seems `launch_in_dev` seems to fire when you run `ember t -s`
*/
launch_in_dev: [
'Chrome'
// add more browsers here if you want...but why?
]
};
if (isHeadless) {
options.browser_args = {
Chrome: [
'--headless',
'--window-size=1440,900',
'--disable-gpu',
'--remote-debugging-port=9222'
],
Firefox: [
'-headless',
'--window-size=1440,900'
]
};
}
module.exports = options;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment