Skip to content

Commit a8b1507

Browse files
authored
Merge pull request #182 from LabKey/fb_merge_23.7_to_develop
Merge discvr-23.7 to develop
2 parents 5a0303b + a453fab commit a8b1507

File tree

10 files changed

+1723
-1437
lines changed

10 files changed

+1723
-1437
lines changed

mcc/jest.config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
globals: {
3+
LABKEY: {},
4+
},
5+
moduleFileExtensions: ['ts', 'tsx', 'js'],
6+
moduleNameMapper: {
7+
'\\.(css)$': '<rootDir>/src/client/test/styleMock.ts',
8+
},
9+
roots: ['<rootDir>'],
10+
setupFilesAfterEnv: [
11+
'./src/client/test/jest.setup.ts'
12+
],
13+
testEnvironment: 'jsdom',
14+
testPathIgnorePatterns: [
15+
'/node_modules/'
16+
],
17+
testRegex: '(\\.(spec))\\.(ts|tsx)$',
18+
transform: {
19+
'^.+\\.tsx?$': [
20+
'ts-jest',
21+
{
22+
tsconfig: 'node_modules/@labkey/build/webpack/tsconfig.json',
23+
}
24+
],
25+
},
26+
};

mcc/package-lock.json

Lines changed: 1683 additions & 1399 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mcc/package.json

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,43 +27,24 @@
2727
"uuid": "^9.0.0"
2828
},
2929
"devDependencies": {
30-
"@labkey/build": "^6.14.0",
30+
"@labkey/build": "^6.15.0",
3131
"@types/chart.js": "^2.9.37",
3232
"@types/jest": "^29.0.0",
3333
"@types/jexl": "^2.3.1",
3434
"@types/jquery": "^3.0.0",
3535
"@types/node": "^18.17.1",
36+
"@types/react": "^17.0.68",
37+
"@types/react-dom": "^17.0.21",
3638
"@types/tsv": "^0.2.1",
3739
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
40+
"canvas": "^2.11.2",
3841
"enzyme": "^3.11.0",
3942
"jest": "^29.0.0",
4043
"jest-canvas-mock": "^2.5.2",
4144
"jest-cli": "^29.0.0",
45+
"jest-environment-jsdom": "^29.7.0",
4246
"jest-mock": "^29.0.0",
43-
"jsdom-global": "^3.0.2",
4447
"rimraf": "^3.0.2",
4548
"ts-jest": "^29.0.0"
46-
},
47-
"jest": {
48-
"globals": {
49-
"ts-jest": {
50-
"tsconfig": "node_modules/@labkey/build/webpack/tsconfig.json"
51-
},
52-
"LABKEY": {}
53-
},
54-
"moduleFileExtensions": [
55-
"ts",
56-
"tsx",
57-
"js"
58-
],
59-
"setupFilesAfterEnv": [
60-
"<rootDir>/test/jest.setup.ts"
61-
],
62-
"moduleNameMapper": {
63-
"\\.(css)$": "<rootDir>/test/styleMock.ts"
64-
},
65-
"transform": {
66-
"^.+\\.tsx?$": "ts-jest"
67-
}
6849
}
6950
}

mcc/src/client/Dashboard/BarChart.spec.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import 'jsdom-global/register'
21
import React from 'react';
32
import { mount, shallow } from 'enzyme';
43
import { mocked } from 'jest-mock';
5-
import { jest, describe, expect, test, beforeEach } from '@jest/globals';
4+
import { describe, expect, jest, test } from '@jest/globals';
65

76
import { Chart } from 'chart.js';
87
import BarChart from './BarChart';

mcc/src/client/Dashboard/Dashboard.spec.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'jsdom-global/register';
21
import React from 'react';
32
import { mount } from 'enzyme';
43
import { mocked } from 'jest-mock';

mcc/src/client/Dashboard/PieChart.spec.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'jsdom-global/register';
21
import React from 'react';
32
import { mount, shallow } from 'enzyme';
43
import { mocked } from 'jest-mock';

mcc/src/client/test/jest.setup.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { configure } from 'enzyme';
2+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
3+
4+
configure({ adapter: new Adapter() });

mcc/test/jest.setup.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

mcc/tsconfig.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "./node_modules/@labkey/build/webpack/tsconfig.json"
3+
}
4+

0 commit comments

Comments
 (0)