diff --git a/core/.eslintignore b/core/.eslintignore index 874d687495a3c4ebcaa87c1e9fb530787e0bd354..21c8a024f75da83ca3e255be4cd3ac158a2553e5 100644 --- a/core/.eslintignore +++ b/core/.eslintignore @@ -4,5 +4,4 @@ node_modules/**/* *.js !*.es6.js modules/locale/tests/locale_test.es6.js -!nightwatch.conf.js !tests/Drupal/Nightwatch/**/*.js diff --git a/core/package.json b/core/package.json index 3a949e76ba82b67d53bc95849f9dcfe2498283ef..d6f405cd898a5f2334cd9af22db326e1bac6443a 100644 --- a/core/package.json +++ b/core/package.json @@ -12,9 +12,9 @@ "build:js-dev": "cross-env NODE_ENV=development node BABEL_ENV=legacy ./scripts/js/babel-es6-build.js", "watch:js": "cross-env BABEL_ENV=legacy node ./scripts/js/babel-es6-watch.js", "watch:js-dev": "cross-env NODE_ENV=development BABEL_ENV=legacy node ./scripts/js/babel-es6-watch.js", - "lint:core-js": "node ./node_modules/eslint/bin/eslint.js --ext=.es6.js . || exit 0", - "lint:core-js-passing": "node ./node_modules/eslint/bin/eslint.js --quiet --config=.eslintrc.passing.json --ext=.es6.js . || exit 0", - "lint:core-js-stats": "node ./node_modules/eslint/bin/eslint.js --format=./scripts/js/eslint-stats-by-type.js --ext=.es6.js . || exit 0", + "lint:core-js": "node ./node_modules/eslint/bin/eslint.js . || exit 0", + "lint:core-js-passing": "node ./node_modules/eslint/bin/eslint.js --quiet --config=.eslintrc.passing.json . || exit 0", + "lint:core-js-stats": "node ./node_modules/eslint/bin/eslint.js --format=./scripts/js/eslint-stats-by-type.js . || exit 0", "lint:css": "stylelint \"**/*.css\" || exit 0", "lint:css-checkstyle": "stylelint \"**/*.css\" --custom-formatter ./node_modules/stylelint-checkstyle-formatter/index.js || exit 0", "test:nightwatch": "cross-env BABEL_ENV=development node -r dotenv-safe/config -r babel-register ./node_modules/.bin/nightwatch --config ./tests/Drupal/Nightwatch/nightwatch.conf.js" diff --git a/core/tests/Drupal/Nightwatch/globals.js b/core/tests/Drupal/Nightwatch/globals.js index fe50dfaaa7e1898c215bcb5ccb43f85664869b7b..72b97ea8d1a78ab2410e747b1c760dd56404cc31 100644 --- a/core/tests/Drupal/Nightwatch/globals.js +++ b/core/tests/Drupal/Nightwatch/globals.js @@ -31,12 +31,11 @@ module.exports = { browser.drupalLogConsole && (!browser.drupalLogConsoleOnlyOnError || browser.currentTest.results.errors > 0 || browser.currentTest.results.failed > 0) ) { - let testName = browser.currentTest.name || browser.currentTest.module; - testName = testName.split(' ').join('-'); const resultPath = path.join(__dirname, `../../../${nightwatchSettings.output_folder}/consoleLogs/${browser.currentTest.module}`); const status = browser.currentTest.results.errors > 0 || browser.currentTest.results.failed > 0 ? 'FAILED' : 'PASSED'; mkdirp.sync(resultPath); - const now = new Date().toString().split(' ').join('-'); + const now = new Date().toString().replace(/[\s]+/g, '-'); + const testName = (browser.currentTest.name || browser.currentTest.module).replace(/[\s/]+/g, '-'); browser .getLog('browser', (logEntries) => { const browserLog = JSON.stringify(logEntries, null, ' ');