1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/rainbond-rainbond-ui

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
run-tests.js 1 КБ
Копировать Редактировать Исходные данные Просмотреть построчно История
barnett Отправлено 7 лет назад 63898f9
const { spawn } = require('child_process');
const { kill } = require('cross-port-killer');
const env = Object.create(process.env);
env.BROWSER = 'none';
const startServer = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ['start'], {
env,
});
startServer.stderr.on('data', (data) => {
// eslint-disable-next-line
console.log(data);
});
startServer.on('exit', () => {
kill(process.env.PORT || 8000);
});
// eslint-disable-next-line
console.log('Starting development server for e2e tests...');
startServer.stdout.on('data', (data) => {
// eslint-disable-next-line
console.log(data.toString());
if (data.toString().indexOf('Compiled successfully') >= 0 ||
data.toString().indexOf('Compiled with warnings') >= 0) {
// eslint-disable-next-line
console.log('Development server is started, ready to run tests.');
const testCmd = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ['test'], {
stdio: 'inherit',
});
testCmd.on('exit', () => {
startServer.kill();
});
}
});

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/rainbond-rainbond-ui.git
git@gitlife.ru:oschina-mirror/rainbond-rainbond-ui.git
oschina-mirror
rainbond-rainbond-ui
rainbond-rainbond-ui
v5.8.0-release