Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
const nightwatchConfig = require('terra-toolkit/lib/nightwatch/nightwatch.config.js').default;
const webpackConfig = require('terra-dev-site/src/config/webpack.config.js');
const getPackageTestDirectories = require('terra-toolkit/lib/nightwatch/setup-helper.js').getPackageTestDirectories;
const path = require('path');
let srcFolders;
const isRepoTest = !process.cwd().includes('packages');
if (isRepoTest) {
srcFolders = getPackageTestDirectories('lerna.json');
} else {
srcFolders = path.join('tests', 'nightwatch');
}
const config = nightwatchConfig(webpackConfig, srcFolders);
module.exports = config;
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
const nightwatchConfig = require('terra-toolkit/lib/nightwatch/nightwatch.config.js').default;
const webpackConfig = require('./webpack.config');
const getPackageTestDirectories = require('terra-toolkit/lib/nightwatch/setup-helper.js').getPackageTestDirectories;
let srcFolders;
const isRepoTest = __dirname === process.cwd();
if (isRepoTest) {
srcFolders = getPackageTestDirectories('lerna.json');
} else {
srcFolders = 'tests/nightwatch/';
}
if (Array.isArray(srcFolders)) {
srcFolders = srcFolders.filter(value => value !== 'packages/terra-clinical-error-view/tests/nightwatch' && value !== 'packages/terra-clinical-no-data-view/tests/nightwatch');
}
const config = nightwatchConfig(webpackConfig, srcFolders);
module.exports = config;
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
const nightwatchConfig = require('terra-toolkit/lib/nightwatch/nightwatch.config.js').default;
const webpackConfig = require('./webpack.config');
const getPackageTestDirectories = require('terra-toolkit/lib/nightwatch/setup-helper.js').getPackageTestDirectories;
let srcFolders;
const isRepoTest = !process.cwd().includes('packages');
if (isRepoTest) {
srcFolders = getPackageTestDirectories('lerna.json');
} else {
srcFolders = 'tests/nightwatch/';
}
const config = nightwatchConfig(webpackConfig, srcFolders);
module.exports = config;