@elliemae/pui-cli 6.0.0-beta.20 → 6.0.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,10 +39,8 @@ const baseRules = {
39
39
  2,
40
40
  'ignorePackages',
41
41
  {
42
- js: 'never',
43
- jsx: 'never',
44
- ts: 'never',
45
- tsx: 'never',
42
+ json: 'ignorePackages',
43
+ js: 'ignorePackages',
46
44
  },
47
45
  ],
48
46
  indent: [
@@ -105,7 +103,7 @@ const reactRules = {
105
103
  'react/react-in-jsx-scope': 0,
106
104
  'react/jsx-filename-extension': [
107
105
  1,
108
- { extensions: ['.js', '.jsx', '.ts', '.tsx'] },
106
+ { extensions: ['.js', '.jsx', '.tsx', '.mdx'] },
109
107
  ],
110
108
  'redux-saga/no-yield-in-race': 2,
111
109
  'redux-saga/yield-effects': 2,
@@ -42,8 +42,8 @@ const jestConfig = {
42
42
  '!app/*/RbGenerated*/*.{js, ts, jsx, tsx}',
43
43
  '!app/index.{js, ts, jsx, tsx}',
44
44
  '!app/global-styles.{js, ts, jsx, tsx}',
45
- '!app/*/*/loadable.{js, ts, jsx, tsx}',
46
- '!lib/*/*/loadable.{js, ts, jsx, tsx}',
45
+ '!app/**/loadable.{js, ts, jsx, tsx}',
46
+ '!lib/**/loadable.{js, ts, jsx, tsx}',
47
47
  ],
48
48
  coverageThreshold: {
49
49
  // Todo: enable the coverage threshold later
@@ -71,12 +71,20 @@ const jestConfig = {
71
71
  },
72
72
  setupFilesAfterEnv: [`${getRootDir()}/lib/testing/setup-tests.js`],
73
73
  setupFiles: ['raf/polyfill', 'whatwg-fetch'],
74
- testRegex: '(app|lib).*/tests/.*\\.test\\.(js|ts)$',
74
+ testRegex: '(app|lib).*/tests/.*\\.test\\.[jt]sx?$',
75
75
  snapshotSerializers: [],
76
76
  testResultsProcessor: 'jest-sonar-reporter',
77
+ resolver: 'ts-jest-resolver',
78
+ transform: {
79
+ '^.+\\.[jt]sx?$': [
80
+ 'esbuild-jest',
81
+ {
82
+ target: 'node14',
83
+ },
84
+ ],
85
+ },
77
86
  transformIgnorePatterns: [
78
- 'node_modules/(?!(@elliemae/*|lodash-es/*)/)',
79
- 'node_modules/@elliemae/em-platform-document-viewer',
87
+ 'node_modules/(?!(@elliemae/pui-cli/lib/testing/*)/)',
80
88
  ],
81
89
  globals: {
82
90
  APP_CONFIG: getAppConfig(),
@@ -86,7 +94,7 @@ const jestConfig = {
86
94
  testEnvironment: 'jsdom',
87
95
  };
88
96
 
89
- if (isReactModule)
97
+ if (isReactModule && jestConfig.setupFilesAfterEnv)
90
98
  jestConfig.setupFilesAfterEnv.push(
91
99
  `${getRootDir()}/lib/testing/setup-styled-components-tests.js`,
92
100
  );
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  *
3
3
  */
4
- export default function () {
4
+ export default () => {
5
5
  Object.defineProperty(window, 'matchMedia', {
6
6
  value: () => ({
7
7
  matches: false,
@@ -15,4 +15,4 @@ export default function () {
15
15
  getPropertyValue: () => {},
16
16
  }),
17
17
  });
18
- }
18
+ };
@@ -1,3 +1 @@
1
- module.exports = {
2
- load: () => {},
3
- };
1
+ export const load = () => {};
@@ -1,36 +1,28 @@
1
- module.exports = {
2
- logger() {
3
- return {
4
- setLogLevel() {},
5
- setOptions() {},
6
- info() {},
7
- warn() {},
8
- error() {},
9
- trace() {},
10
- debug() {},
11
- audit() {},
12
- fatal() {},
13
- };
14
- },
15
- LogLevel: {
16
- info: 'info',
17
- debug: 'debug',
18
- trace: 'trace',
19
- warn: 'warn',
20
- error: 'error',
21
- audit: 'audit',
22
- fatal: 'fatal',
23
- },
24
- Console() {
25
- return {
26
- log() {},
27
- };
28
- },
29
- http() {
30
- return {
31
- log() {},
32
- };
33
- },
34
- webvitals() {},
35
- logUnhandledErrors() {},
1
+ export const logger = () => ({
2
+ setLogLevel() {},
3
+ setOptions() {},
4
+ info() {},
5
+ warn() {},
6
+ error() {},
7
+ trace() {},
8
+ debug() {},
9
+ audit() {},
10
+ fatal() {},
11
+ });
12
+ export const LogLevel = {
13
+ info: 'info',
14
+ debug: 'debug',
15
+ trace: 'trace',
16
+ warn: 'warn',
17
+ error: 'error',
18
+ audit: 'audit',
19
+ fatal: 'fatal',
36
20
  };
21
+ export const Console = () => ({
22
+ log: () => {},
23
+ });
24
+ export const http = () => ({
25
+ log() {},
26
+ });
27
+ export const webvitals = () => {};
28
+ export const logUnhandledErrors = () => {};
@@ -1,5 +1,3 @@
1
- module.exports = {
2
- setCustomUserData: () => {},
3
- setCustomVirtualPageName: () => {},
4
- startVirtualPageMonitoringWithAutoEnd: () => {},
5
- };
1
+ export const setCustomUserData = () => {};
2
+ export const setCustomVirtualPageName = () => {};
3
+ export const startVirtualPageMonitoringWithAutoEnd = () => {};
@@ -1,5 +1,3 @@
1
- module.exports = {
2
- attach: jest.fn(),
3
- detach: jest.fn(),
4
- getConfig: jest.fn(),
5
- };
1
+ export const attach = jest.fn();
2
+ export const detach = jest.fn();
3
+ export const getConfig = jest.fn();
@@ -3,12 +3,12 @@
3
3
  import 'core-js/stable';
4
4
  import 'regenerator-runtime/runtime';
5
5
  import '@testing-library/jest-dom/extend-expect';
6
- import { toHaveNoViolations } from 'jest-axe';
6
+ import jestAxe from 'jest-axe';
7
7
  import ResizeObserver from 'resize-observer-polyfill';
8
- import addMatchMedia from './mocks/matchMedia';
9
- import { logger } from './mocks/pui-diagnostics';
8
+ import addMatchMedia from './mocks/matchMedia.js';
9
+ import { logger } from './mocks/pui-diagnostics.js';
10
10
 
11
- if (expect) expect.extend(toHaveNoViolations);
11
+ if (expect) expect.extend(jestAxe.toHaveNoViolations);
12
12
  jest.setTimeout(60000);
13
13
 
14
14
  const addElementToBody = (element) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.0.0-beta.20",
3
+ "version": "6.0.0-beta.21",
4
4
  "private": false,
5
5
  "description": "ICE MT UI Platform CLI",
6
6
  "sideEffects": false,
@@ -82,7 +82,7 @@
82
82
  "@storybook/theming": "~6.4.7",
83
83
  "@stylelint/postcss-css-in-js": "~0.37.2",
84
84
  "@svgr/webpack": "~6.1.0",
85
- "@testing-library/jest-dom": "~5.15.1",
85
+ "@testing-library/jest-dom": "~5.16.0",
86
86
  "@testing-library/react": "~12.1.2",
87
87
  "@testing-library/react-hooks": "~7.0.2",
88
88
  "@types/jest": "~27.0.3",
@@ -222,6 +222,7 @@
222
222
  "svg-url-loader": "~7.1.1",
223
223
  "svgo": "~2.8.0",
224
224
  "terser-webpack-plugin": "~5.2.5",
225
+ "ts-jest-resolver": "~2.0.0",
225
226
  "ts-node": "~10.4.0",
226
227
  "tsc-alias": "~1.4.2",
227
228
  "tsc-files": "~1.1.3",