提交 ba07f115 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

test executable in docker

上级 77ab7104
......@@ -5,14 +5,18 @@ import sinon from 'sinon'
import { Config, log } from '../'
// !Config.isDocker && test('Docker test skipped', function(t) {
// t.pass('not in docker, skip docker tests')
// })
/**
* need keep this !Config.isDocker because ava need at least one test() inside.
* × No tests found in test\docker.spec.js
*/
!Config.isDocker && test('Docker test skipped', function(t) {
t.pass('not in docker. this test is to prevent AVA `× No tests found in test\docker.spec.js` error.')
})
Config.isDocker && test('Docker smoking test', function(t) {
// const n = execSync('ps a | grep Xvfb | grep -v grep | wc -l').toString().replace(/\n/, '', 'g')
// t.is(parseInt(n), 1, 'should has Xvfb started')
t.notThrows(_ => {
fs.accessSync(Config.BINARY_CHROMIUM, fs.F_OK)
fs.accessSync(Config.BINARY_CHROMIUM, fs.X_OK)
}, 'should exist xvfb-chrome exectable')
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册