-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
149 additions
and
38,453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Ignore all files except webpack directory | ||
**/*.js | ||
!webpack/**/*.js |
8 changes: 0 additions & 8 deletions
8
app/overrides/compute_resources_vms/form/add_react_to_host_form.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: ['@theforeman/builder/babel'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import globals from "globals"; | ||
import pluginJs from "@eslint/js"; | ||
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js"; | ||
|
||
|
||
export default [ | ||
{files: ["**/*.{js,mjs,cjs,jsx}"]}, | ||
{ languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } } }, | ||
{languageOptions: { globals: globals.browser }}, | ||
pluginJs.configs.recommended, | ||
pluginReactConfig, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// runs before each test to make sure console.error output will | ||
// fail a test (i.e. default PropType missing). Check the error | ||
// output and traceback for actual error. | ||
global.console.error = (error, stack) => { | ||
/* eslint-disable-next-line no-console */ | ||
if (stack) console.log(stack); // Prints out original stack trace | ||
throw new Error(error); | ||
}; | ||
|
||
// Increase jest timeout as some tests using multiple http mocks can time out on CI systems. | ||
jest.setTimeout(10000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Find where foreman is located | ||
const { foremanRelativePath, foremanLocation } = require('@theforeman/find-foreman'); | ||
const foremanReactRelative = 'webpack/assets/javascripts/react_app'; | ||
const foremanFull = foremanLocation(); | ||
const foremanReactFull = foremanRelativePath(foremanReactRelative); | ||
|
||
module.exports = { | ||
testURL: 'http://localhost/', | ||
setupFiles: [ | ||
'./webpack/test_setup.js', | ||
], | ||
setupFilesAfterEnv: [ | ||
'./webpack/global_test_setup.js', | ||
'@testing-library/jest-dom' | ||
], | ||
testPathIgnorePatterns: [ | ||
'/node_modules/', | ||
'<rootDir>/foreman/', | ||
'<rootDir>/.+fixtures.+', | ||
'<rootDir>/engines', | ||
], | ||
moduleDirectories: [ | ||
`${foremanFull}/node_modules`, | ||
`${foremanFull}/node_modules/@theforeman/vendor-core/node_modules`, | ||
'node_modules', | ||
'webpack/test-utils', | ||
], | ||
modulePathIgnorePatterns: [ | ||
'<rootDir>/foreman/', | ||
], | ||
moduleNameMapper: { | ||
'^.+\\.(css|scss)$': 'identity-obj-proxy', | ||
'^foremanReact(.*)$': `${foremanReactFull}/$1`, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"paths": { | ||
"foremanReact/*": ["../foreman/webpack/assets/javascripts/react_app/*"] | ||
} | ||
} | ||
} |
Oops, something went wrong.