How to use @theforeman/find-foreman - 5 common examples

To help you get started, we’ve selected a few @theforeman/find-foreman 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 Katello / katello / jest.config.js View on Github external
const { foremanLocation, foremanRelativePath } = require('@theforeman/find-foreman')
const foremanReactRelative = 'webpack/assets/javascripts/react_app';
const foremanFull = foremanLocation();
const foremanReactFull = foremanRelativePath(foremanReactRelative);

// Jest configuration
module.exports = {
  testURL: 'http://localhost/',
  setupFiles: [
    './webpack/test_setup.js',
  ],
  setupFilesAfterEnv: [
    './webpack/global_test_setup.js',
    '@testing-library/jest-dom'
  ],
  testPathIgnorePatterns: [
    '/node_modules/',
    '/foreman/',
    '/.+fixtures.+',
    '/engines',
github Katello / katello / jest.config.js View on Github external
const { foremanLocation, foremanRelativePath } = require('@theforeman/find-foreman')
const foremanReactRelative = 'webpack/assets/javascripts/react_app';
const foremanFull = foremanLocation();
const foremanReactFull = foremanRelativePath(foremanReactRelative);

// Jest configuration
module.exports = {
  testURL: 'http://localhost/',
  setupFiles: [
    './webpack/test_setup.js',
  ],
  setupFilesAfterEnv: [
    './webpack/global_test_setup.js',
    '@testing-library/jest-dom'
  ],
  testPathIgnorePatterns: [
    '/node_modules/',
    '/foreman/',
    '/.+fixtures.+',
github Katello / katello / webpack / .eslintrc.js View on Github external
const path = require('path');
const { foremanLocation, foremanRelativePath } = require('@theforeman/find-foreman');
const foremanFull = foremanLocation();
const foremanLintingRelative = './node_modules/@theforeman/vendor-dev/eslint.extends.js'
const foremanLintingConfig = foremanRelativePath(foremanLintingRelative);
const foremanVendorRelative = './node_modules/@theforeman/vendor-core/';
const foremanVendorDir = foremanRelativePath(foremanVendorRelative);

module.exports = {
  env: {
    browser: true,
    'jest/globals': true
  },
  'extends': [
    'airbnb',
    'plugin:jest/recommended',
    `${foremanLintingConfig}`,
  ],
  plugins: [
    'jest',
    'react',
    'babel',
    'promise'
github Katello / katello / webpack / .eslintrc.js View on Github external
const path = require('path');
const { foremanLocation, foremanRelativePath } = require('@theforeman/find-foreman');
const foremanFull = foremanLocation();
const foremanLintingRelative = './node_modules/@theforeman/vendor-dev/eslint.extends.js'
const foremanLintingConfig = foremanRelativePath(foremanLintingRelative);
const foremanVendorRelative = './node_modules/@theforeman/vendor-core/';
const foremanVendorDir = foremanRelativePath(foremanVendorRelative);

module.exports = {
  env: {
    browser: true,
    'jest/globals': true
  },
  'extends': [
    'airbnb',
    'plugin:jest/recommended',
    `${foremanLintingConfig}`,
  ],
  plugins: [
    'jest',
    'react',
github Katello / katello / webpack / .eslintrc.js View on Github external
const path = require('path');
const { foremanLocation, foremanRelativePath } = require('@theforeman/find-foreman');
const foremanFull = foremanLocation();
const foremanLintingRelative = './node_modules/@theforeman/vendor-dev/eslint.extends.js'
const foremanLintingConfig = foremanRelativePath(foremanLintingRelative);
const foremanVendorRelative = './node_modules/@theforeman/vendor-core/';
const foremanVendorDir = foremanRelativePath(foremanVendorRelative);

module.exports = {
  env: {
    browser: true,
    'jest/globals': true
  },
  'extends': [
    'airbnb',
    'plugin:jest/recommended',
    `${foremanLintingConfig}`,
  ],
  plugins: [

@theforeman/find-foreman

For Foreman plugins to find the foreman directory relative to the plugin and return a full path. This can be useful in testing environments where you want to point testing tools at installed Foreman packages rather than duplicate them in the plugin.

MIT
Latest version published 3 days ago

Package Health Score

79 / 100
Full package analysis