- Linting (ESLint): Make path dynamic in preparation for possible move to own library and to avoid complaints when mochawesome.json not yet built
parent
27ff9c3240
commit
3c10411594
|
@ -228,13 +228,6 @@ module.exports = {
|
|||
strict: 'off'
|
||||
}
|
||||
},
|
||||
{
|
||||
extends: ['plugin:node/recommended-script'],
|
||||
files: [
|
||||
'cypress/support/build-coverage-badge.js',
|
||||
'build/testing-badge.js'
|
||||
]
|
||||
},
|
||||
{
|
||||
// Should probably have as external, but should still check
|
||||
files: ['canvg/rgbcolor.js'],
|
||||
|
|
|
@ -20,6 +20,8 @@ const reporterFile = process.argv[2]
|
|||
? process.argv[2].replace(/^--/u, '')
|
||||
: 'spec';
|
||||
|
||||
const path = '../mochawesome.json';
|
||||
|
||||
// eslint-disable-next-line import/no-dynamic-require
|
||||
const MochaReporter = require(`mocha/lib/reporters/${reporterFile}.js`);
|
||||
const Suite = require('mocha/lib/suite.js');
|
||||
|
@ -36,7 +38,8 @@ const {constants: {
|
|||
EVENT_TEST_PENDING
|
||||
}} = require('mocha/lib/runner.js');
|
||||
|
||||
const {results, stats} = require('../mochawesome.json');
|
||||
// eslint-disable-next-line import/no-dynamic-require
|
||||
const {results, stats} = require(path);
|
||||
|
||||
const runner = new Runner(
|
||||
new Suite('', null, true)
|
||||
|
|
Loading…
Reference in New Issue