Skip to content

Commit

Permalink
Merge pull request #2927 from bennypowers/spike/rhds/footer
Browse files Browse the repository at this point in the history
feat: integrate `@rhds/elements/rh-footer`
  • Loading branch information
Hyperkid123 authored Sep 17, 2024
2 parents 1861a45 + 6f617f9 commit ef65bb6
Show file tree
Hide file tree
Showing 20 changed files with 1,481 additions and 266 deletions.
27 changes: 23 additions & 4 deletions config/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,29 @@ import 'whatwg-fetch';

global.SVGPathElement = function () {};

global.MutationObserver = class {
constructor(callback) {}
disconnect() {}
observe(element, initObject) {}
class ObserverShim {
observe() {
void 0;
}

disconnect() {
void 0;
}
}

global.ErrorEvent ??= Event;
global.IntersectionObserver ??= ObserverShim;
global.MutationObserver ??= ObserverShim;
global.matchMedia = () => new EventTarget();
global.getComputedStyle ??= function () {
return {
getPropertyPriority() {
return '';
},
getPropertyValue() {
return '';
},
};
};

global.window = Object.create(window);
Expand Down
1 change: 1 addition & 0 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const commonConfig = ({ dev }) => {
unfetch: path.resolve(__dirname, '../src/moduleOverrides/unfetch'),
'@scalprum/core': path.resolve(__dirname, '../node_modules/@scalprum/core'),
'@scalprum/react-core': path.resolve(__dirname, '../node_modules/@scalprum/react-core'),
'@rhds/icons': path.resolve(__dirname, '../node_modules/@rhds/icons'),
},
fallback: {
path: require.resolve('path-browserify'),
Expand Down
13 changes: 12 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ module.exports = {
testEnvironmentOptions: {
url: 'https://test.com',
},
transformIgnorePatterns: ['<rootDir>/node_modules/(?!@patternfly/react-tokens/dist/esm|@patternfly/react-icons/dist/esm).+(js|jsx)$'],
transformIgnorePatterns: [
`<rootDir>/node_modules/(?!${[
'@patternfly/react-tokens/dist/esm',
'@patternfly/react-icons/dist/esm',
'@patternfly/(elements|pfe-core)/.*',
'@rhds/elements/.*',
'@rhds/icons/.*',
'@rhds/tokens/.*',
'@?lit(/.*)?',
].join('|')}).+(js|jsx)$`,
],
transform: {
'^.+\\.(ts|js)x?$': [
'@swc/jest',
Expand Down Expand Up @@ -42,5 +52,6 @@ module.exports = {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/src/__mocks__/fileMock.js',
'react-markdown': '<rootDir>/src/__mocks__/empty-mock.js',
'remark-gfm': '<rootDir>/src/__mocks__/empty-mock.js',
'@rhds/elements/rh-icon/rh-icon.js': '<rootDir>/src/__mocks__/empty-mock.js',
},
};
Loading

0 comments on commit ef65bb6

Please sign in to comment.