headless chrome for unit tests (#169)

This commit is contained in:
Denys Vuika 2017-12-21 13:55:40 +00:00 committed by Cilibiu Bogdan
parent 60cba5b93b
commit 887d8b811c
2 changed files with 9 additions and 8 deletions

View File

@ -12,16 +12,12 @@ cache:
services:
- docker
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
install:
- npm install
script:
- npm run build
- npm run test -- --single-run --no-progress --browser=ChromeNoSandbox
- npm run test -- --single-run --no-progress
# Send coverage data to codecov
after_success:

View File

@ -38,11 +38,16 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
browsers: ['ChromeHeadless'],
customLaunchers: {
ChromeNoSandbox: {
ChromeHeadless: {
base: 'Chrome',
flags: ['--no-sandbox']
flags: [
'--no-sandbox',
'--headless',
'--disable-gpu',
'--remote-debugging-port=9222'
]
}
},
singleRun: false,