File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ module . exports = {
2+ globals : {
3+ LABKEY : {
4+ contextPath : ''
5+ }
6+ } ,
7+ moduleFileExtensions : [
8+ 'tsx' ,
9+ 'ts' ,
10+ 'js'
11+ ] ,
12+ preset : 'ts-jest' ,
13+ setupFilesAfterEnv : [
14+ '<rootDir>/test/js/setup.ts'
15+ ] ,
16+ testEnvironment : 'jsdom' ,
17+ testMatch : null ,
18+ testRegex : '(\\.(test))\\.(ts|tsx)$' ,
19+ testResultsProcessor : 'jest-teamcity-reporter' ,
20+ transform : {
21+ '^.+\\.tsx?$' : [
22+ 'ts-jest' ,
23+ {
24+ tsconfig : 'node_modules/@labkey/build/webpack/tsconfig.test.json' ,
25+ }
26+ ]
27+ }
28+ } ;
Original file line number Diff line number Diff line change 1212 "clean" : " rimraf resources/web/elisa/gen && rimraf resources/web/gen" ,
1313 "test" : " cross-env NODE_ENV=test jest --silent"
1414 },
15- "jest" : {
16- "globals" : {
17- "LABKEY" : {
18- "contextPath" : " "
19- }
20- },
21- "moduleFileExtensions" : [
22- " tsx" ,
23- " ts" ,
24- " js"
25- ],
26- "preset" : " ts-jest" ,
27- "setupFilesAfterEnv" : [
28- " <rootDir>/test/js/setup.ts"
29- ],
30- "testEnvironment" : " jsdom" ,
31- "testMatch" : null ,
32- "testRegex" : " (\\ .(test))\\ .(ts|tsx)$" ,
33- "testResultsProcessor" : " jest-teamcity-reporter" ,
34- "transform" : {
35- "^.+\\ .tsx?$" : [
36- " ts-jest" ,
37- {
38- "tsconfig" : " node_modules/@labkey/build/webpack/tsconfig.test.json"
39- }
40- ]
41- }
42- },
4315 "dependencies" : {
4416 "@labkey/components" : " 6.54.3-fb-nodejs-22.0"
4517 },
Original file line number Diff line number Diff line change 11import "@testing-library/jest-dom" ; // add custom jest matchers from jest-dom
2+ import { App } from "@labkey/components" ;
3+
4+ // Configure @labkey /components to recognize this as a testing environment
5+ App . setIsTestEnv ( true ) ;
You can’t perform that action at this time.
0 commit comments