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: services:
- docker - docker
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
install: install:
- npm install - npm install
script: script:
- npm run build - npm run build
- npm run test -- --single-run --no-progress --browser=ChromeNoSandbox - npm run test -- --single-run --no-progress
# Send coverage data to codecov # Send coverage data to codecov
after_success: after_success:

View File

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