Last active
March 18, 2019 00:02
-
-
Save DrPep/05955fe8b51735fd0b7ddbf72198b8a4 to your computer and use it in GitHub Desktop.
Revisions
-
DrPep revised this gist
Mar 18, 2019 . 1 changed file with 13 additions and 19 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,48 +1,42 @@ const { spawn } = require('child_process') const waitOn = require('wait-on') let subProcess exports.config = { tests: './test/tests/*_test.js', output: './output', helpers: { Puppeteer: { url: 'http://localhost:8080', show: false, chrome: { "args": ["--no-sandbox", "--disable-setuid-sandbox", "--single-process"] } } }, include: { I: './test/support/steps_file.js' }, bootstrap: function (done) { subProcess = spawn('./node_modules/.bin/http-server', ['./dist'], { detached: true }) waitOn({resources: ['http://localhost:8080']}) .then(done) .catch(function (err) { console.log('[spawn] Error starting server') done() }); }, teardown: function (done) { subProcess.kill() done() }, mocha: {}, name: '<APP NAME GOES HERE>' } -
DrPep renamed this gist
Mar 3, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
DrPep created this gist
Mar 3, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ const { spawn } = require('child-process-promise') const waitOn = require('wait-on') let childProcess exports.config = { tests: './test/tests/*_test.js', output: './output', helpers: { Puppeteer: { url: 'http://localhost:8080', show: true } }, include: { I: './test/support/steps_file.js' }, bootstrap: function (done) { let promise = spawn('./node_modules/.bin/vue-cli-service', ['serve']) childProcess = promise.childProcess console.log('[spawn] childProcess.pid: ', childProcess.pid) childProcess.stdout.on('data', function (data) { console.log('[spawn] stdout: ', data.toString()) }); waitOn({resources: ['http://localhost:8080']}) .then(done) .catch(function (err) { handleError(err) done() }); promise.then(function () { console.log('[spawn] done!') }).catch(function (err) { console.error('[spawn] ERROR: ', err) }); }, teardown: function (done) { childProcess.kill('SIGTERM') done() }, mocha: {}, name: 'APP NAME' }