@openmrs/esm-home-app 4.0.1-pre.160 → 4.0.1-pre.162

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.
@@ -24,4 +24,4 @@ This can impact web performance.
24
24
  Assets:
25
25
  858.js (397 KiB)
26
26
 
27
- webpack 5.75.0 compiled with 1 warning in 11341 ms
27
+ webpack 5.75.0 compiled with 1 warning in 12628 ms
package/jest.config.js ADDED
@@ -0,0 +1,23 @@
1
+ module.exports = {
2
+ transform: {
3
+ '^.+\\.tsx?$': '@swc/jest',
4
+ },
5
+ transformIgnorePatterns: ['/node_modules/(?!@openmrs)'],
6
+ moduleNameMapper: {
7
+ '\\.(s?css)$': 'identity-obj-proxy',
8
+ '@openmrs/esm-framework': '@openmrs/esm-framework/mock',
9
+ 'lodash-es': 'lodash',
10
+ },
11
+ collectCoverageFrom: [
12
+ '**/src/**/*.tsx',
13
+ '!**/node_modules/**',
14
+ '!**/vendor/**',
15
+ '!**/src/**/*.test.*',
16
+ '!**/src/declarations.d.tsx',
17
+ ],
18
+ setupFilesAfterEnv: ['<rootDir>/setupTests.ts'],
19
+ testEnvironment: 'jsdom',
20
+ testEnvironmentOptions: {
21
+ url: 'http://localhost/',
22
+ },
23
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-home-app",
3
- "version": "4.0.1-pre.160",
3
+ "version": "4.0.1-pre.162",
4
4
  "description": "Homepage microfrontend for the OpenMRS SPA",
5
5
  "browser": "dist/openmrs-esm-home-app.js",
6
6
  "main": "src/index.ts",
@@ -14,7 +14,9 @@
14
14
  "analyze": "webpack --mode=production --env.analyze=true",
15
15
  "lint": "eslint src --ext tsx",
16
16
  "typescript": "tsc",
17
- "extract-translations": "i18next 'src/**/*.{component.tsx,tsx}' --config ../../tools/i18next-parser.config.js"
17
+ "extract-translations": "i18next 'src/**/*.{component.tsx,tsx}' --config ../../tools/i18next-parser.config.js",
18
+ "test": "cross-env TZ=UTC jest --config jest.config.js --verbose false --passWithNoTests",
19
+ "coverage": "yarn test --coverage"
18
20
  },
19
21
  "browserslist": [
20
22
  "extends browserslist-config-openmrs"
@@ -43,5 +45,5 @@
43
45
  "react-i18next": "11.x",
44
46
  "react-router-dom": "6.x"
45
47
  },
46
- "gitHead": "cc0e84e0407652d4a0d991eebe0696d84a86ce55"
48
+ "gitHead": "f409bcc3e6422832ca40877b1499d7f4ec143644"
47
49
  }
package/setupTests.ts CHANGED
@@ -1,7 +1,8 @@
1
- import '@testing-library/jest-dom/extend-expect';
1
+ import '@testing-library/jest-dom';
2
2
 
3
3
  declare global {
4
4
  interface Window {
5
+ getOpenmrsSpaBase: () => string;
5
6
  openmrsBase: string;
6
7
  spaBase: string;
7
8
  }