Skip to content

Commit 16c283a

Browse files
authored
Merge pull request #25 from fhlavac/main
Tests & docs cleanup
2 parents a4ac29f + ad17d9f commit 16c283a

File tree

23 files changed

+453
-1119
lines changed

23 files changed

+453
-1119
lines changed

config/setupTests.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
/* eslint-disable no-unused-vars */
2-
import { configure } from 'enzyme';
3-
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
42
import 'whatwg-fetch';
53
import 'babel-polyfill';
64
import '@testing-library/jest-dom';
75

8-
configure({ adapter: new Adapter() });
96
global.SVGPathElement = function () {};
107

118
global.MutationObserver = class {

jest.config.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ const config = {
2020
],
2121
setupFilesAfterEnv: [ '<rootDir>/config/setupTests.js', 'jest-canvas-mock' ],
2222
testEnvironment: 'jsdom',
23+
testEnvironmentOptions: {
24+
url: 'http://localhost:5000/',
25+
},
2326
roots: [ '<rootDir>/packages/' ],
2427
// modulePathIgnorePatterns: ['<rootDir>/packages/create-crc-app/templates', '<rootDir>/packages/docs/.cache'],
2528
modulePathIgnorePatterns: [
@@ -35,16 +38,10 @@ const config = {
3538
PFReactCore: '@patternfly/react-core',
3639
PFReactTable: '@patternfly/react-table',
3740
},
38-
testURL: 'http://localhost:5000/',
3941
globalSetup: '<rootDir>/config/globalSetup.js',
4042
transform: {
4143
'^.+\\.jsx?$': 'babel-jest',
42-
'^.+\\.tsx?$': 'ts-jest',
43-
},
44-
globals: {
45-
'ts-jest': {
46-
tsconfig: './packages/module/tsconfig.json',
47-
},
44+
'^.+\\.tsx?$': [ 'ts-jest', { tsconfig: './packages/module/tsconfig.json', } ],
4845
},
4946
};
5047

0 commit comments

Comments
 (0)