How to use the terra-toolkit/lib/nightwatch/nightwatch.config.js.default function in terra-toolkit

To help you get started, we’ve selected a few terra-toolkit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cerner / terra-core / nightwatch.conf.js View on Github external
/* 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;
github cerner / terra-framework / nightwatch.conf.js View on Github external
/* 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;
github cerner / terra-clinical / nightwatch.conf.js View on Github external
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;