Refactor simple JS to be main JS tests
[MAILPOET-2455]
This commit is contained in:
committed by
Jack Kitterhing
parent
a6dfab1178
commit
6015a1370d
19
RoboFile.php
19
RoboFile.php
@ -204,13 +204,13 @@ class RoboFile extends \Robo\Tasks {
|
||||
return $this->execWithXDebug($command);
|
||||
}
|
||||
|
||||
function testJavascript($xml_output_file = null) {
|
||||
function testNewsletterEditor($xml_output_file = null) {
|
||||
$this->compileJs();
|
||||
|
||||
$command = join(' ', [
|
||||
'./node_modules/.bin/mocha',
|
||||
'-r tests/javascript/mochaTestHelper.js',
|
||||
'tests/javascript/testBundles/**/*.js',
|
||||
'-r tests/javascript_newsletter_editor/mochaTestHelper.js',
|
||||
'tests/javascript_newsletter_editor/testBundles/**/*.js',
|
||||
]);
|
||||
|
||||
if (!empty($xml_output_file)) {
|
||||
@ -223,6 +223,19 @@ class RoboFile extends \Robo\Tasks {
|
||||
return $this->_exec($command);
|
||||
}
|
||||
|
||||
function testJavascript($xml_output_file = null) {
|
||||
$command = './node_modules/.bin/mocha --require @babel/register tests/javascript/**/*.spec.js';
|
||||
|
||||
if (!empty($xml_output_file)) {
|
||||
$command .= sprintf(
|
||||
' --reporter xunit --reporter-options output="%s"',
|
||||
$xml_output_file
|
||||
);
|
||||
}
|
||||
|
||||
return $this->_exec($command);
|
||||
}
|
||||
|
||||
function securityComposer() {
|
||||
return $this->collectionBuilder()
|
||||
->taskExec('vendor/bin/security-checker security:check --format=simple')
|
||||
|
Reference in New Issue
Block a user