@openmrs/esm-fast-data-entry-app 1.4.2-pre.728 → 1.4.2-pre.736
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.
- package/dist/9108.js +1 -1
- package/dist/9108.js.LICENSE.txt +9 -0
- package/dist/9108.js.map +1 -1
- package/dist/openmrs-esm-fast-data-entry-app.js.buildmanifest.json +3 -3
- package/dist/routes.json +1 -1
- package/package.json +12 -13
- package/src/FormBootstrap.test.tsx +12 -11
- package/src/add-group-modal/AddGroupModal.test.tsx +13 -12
- package/src/context/FormWorkflowReducer.test.ts +3 -2
- package/src/context/GroupFormWorkflowReducer.test.ts +6 -5
- package/src/form-entry-workflow/patient-banner/PatientBanner.test.tsx +1 -0
- package/src/form-entry-workflow/patient-search-header/PatientSearchHeader.test.tsx +17 -17
- package/src/group-form-entry-workflow/GroupSessionWorkspace.test.tsx +24 -23
- package/src/group-form-entry-workflow/SessionMetaWorkspace.test.tsx +6 -5
- package/src/group-form-entry-workflow/group-display-header/GroupDisplayHeader.test.tsx +1 -0
- package/src/group-form-entry-workflow/group-search-header/GroupSearchHeader.test.tsx +11 -10
- package/src/hooks/useGetPatient.test.tsx +5 -4
- package/src/setup-tests.ts +5 -1
- package/vitest.config.ts +40 -0
- package/jest.config.json +0 -31
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
import { defineConfig } from 'vitest/config';
|
|
3
|
+
|
|
4
|
+
const r = (relativePath: string) => fileURLToPath(new URL(relativePath, import.meta.url));
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
resolve: {
|
|
8
|
+
alias: [{ find: /^.*\.s?css$/, replacement: 'identity-obj-proxy' }],
|
|
9
|
+
},
|
|
10
|
+
test: {
|
|
11
|
+
environment: 'jsdom',
|
|
12
|
+
globals: true,
|
|
13
|
+
clearMocks: true,
|
|
14
|
+
setupFiles: ['./src/setup-tests.ts'],
|
|
15
|
+
exclude: ['**/node_modules/**', '**/e2e/**', '**/dist/**'],
|
|
16
|
+
server: {
|
|
17
|
+
deps: {
|
|
18
|
+
inline: [/@openmrs/],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
fakeTimers: {
|
|
22
|
+
toFake: [
|
|
23
|
+
'setTimeout',
|
|
24
|
+
'clearTimeout',
|
|
25
|
+
'setInterval',
|
|
26
|
+
'clearInterval',
|
|
27
|
+
'setImmediate',
|
|
28
|
+
'clearImmediate',
|
|
29
|
+
'requestAnimationFrame',
|
|
30
|
+
'cancelAnimationFrame',
|
|
31
|
+
'Date',
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
alias: {
|
|
35
|
+
'@openmrs/esm-framework/src/internal': '@openmrs/esm-framework/mock',
|
|
36
|
+
'@openmrs/esm-framework': '@openmrs/esm-framework/mock',
|
|
37
|
+
'react-i18next': r('./__mocks__/react-i18next.js'),
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
});
|
package/jest.config.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
{
|
|
3
|
-
"clearMocks": true,
|
|
4
|
-
"collectCoverageFrom": [
|
|
5
|
-
"**/src/**/*.component.tsx",
|
|
6
|
-
"!**/node_modules/**",
|
|
7
|
-
"!**/src/declarations.d.ts",
|
|
8
|
-
"!**/e2e/**"
|
|
9
|
-
],
|
|
10
|
-
"transform": {
|
|
11
|
-
"^.+\\.m?[jt]sx?$": ["@swc/jest"]
|
|
12
|
-
},
|
|
13
|
-
"transformIgnorePatterns": ["/node_modules/(?!@openmrs)"],
|
|
14
|
-
"moduleNameMapper": {
|
|
15
|
-
"@openmrs/esm-framework": "@openmrs/esm-framework/mock",
|
|
16
|
-
"\\.(s?css)$": "identity-obj-proxy",
|
|
17
|
-
"^lodash-es/(.*)$": "lodash/$1",
|
|
18
|
-
"^lodash-es$": "lodash",
|
|
19
|
-
"^dexie$": "<rootDir>/node_modules/dexie",
|
|
20
|
-
"^react-i18next$": "<rootDir>/__mocks__/react-i18next.js"
|
|
21
|
-
},
|
|
22
|
-
"setupFilesAfterEnv": ["<rootDir>/src/setup-tests.ts"],
|
|
23
|
-
"testEnvironment": "jsdom",
|
|
24
|
-
"testEnvironmentOptions": {
|
|
25
|
-
"url": "http://localhost/"
|
|
26
|
-
},
|
|
27
|
-
"testPathIgnorePatterns": [
|
|
28
|
-
"/node_modules/",
|
|
29
|
-
"/e2e/"
|
|
30
|
-
]
|
|
31
|
-
}
|