Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions assay/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2023-2026 LabKey Corporation. All rights reserved. No portion of this work may be reproduced
* in any form or by any electronic or mechanical means without written permission from LabKey Corporation.
*/
module.exports = {
globals: {
LABKEY: {
contextPath: '/labkey',
container: {
path: '/DefaultTestContainer',
formats: {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm',
timeFormat: 'HH:mm',
},
},
user: {
displayName: 'Bill',
id: 1004,
},
},
},
moduleFileExtensions: ['ts', 'tsx', 'js'],
moduleNameMapper: {
'\\.(scss|css)$': '<rootDir>/test/js/fileMock.js',
},
// This is actually the default configuration for reporters, but for some reason with our modules it gets wiped out
// and then there is no test summary when failures happen, which means that you'll almost never see what tests
// failed unless they were the last tests to run.
reporters: [['default', { summaryThreshold: 10 }]],
setupFilesAfterEnv: ['./test/js/setup.ts'],
testEnvironment: 'jsdom',
testRegex: '(\\.(test))\\.(ts|tsx)$',
testResultsProcessor: 'jest-teamcity-reporter',
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: 'node_modules/@labkey/build/webpack/tsconfig.test.json',
},
],
},
};
1,741 changes: 569 additions & 1,172 deletions assay/package-lock.json

Large diffs are not rendered by default.

54 changes: 9 additions & 45 deletions assay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,59 +14,23 @@
"lint": "eslint",
"lint-fix": "eslint --fix"
},
"jest": {
"globals": {
"LABKEY": {
"container": {
"formats": {
"dateFormat": "yyyy-MM-dd"
}
},
"user": {
"id": 1004
},
"project": {},
"moduleContext": {}
}
},
"moduleNameMapper": {
"\\.(scss|css)$": "<rootDir>/test/js/fileMock.js"
},
"moduleFileExtensions": [
"tsx",
"ts",
"js"
],
"preset": "ts-jest",
"setupFilesAfterEnv": [
"<rootDir>/test/js/setup.ts"
],
"testEnvironment": "jsdom",
"testMatch": null,
"testRegex": "(\\.(test))\\.(ts|tsx)$",
"testResultsProcessor": "jest-teamcity-reporter",
"transform": {
"^.+\\.tsx?$": [
"ts-jest",
{
"tsconfig": "node_modules/@labkey/build/webpack/tsconfig.test.json"
}
]
}
},
"dependencies": {
"@labkey/components": "7.40.1"
"@labkey/components": "7.42.1-fb-package-updates-060126.4"
},
"devDependencies": {
"@labkey/build": "9.1.4",
"@labkey/eslint-config": "1.2.1",
"@labkey/build": "9.1.5-fb-package-updates-060126.6",
"@labkey/eslint-config": "1.2.2-fb-package-updates-060126.1",
"@types/jest": "30.0.0",
"@types/react": "18.3.27",
"@types/react": "18.3.31",
"@types/react-dom": "18.3.7",
"jest": "30.4.2",
"jest-cli": "30.4.2",
"jest-environment-jsdom": "30.4.1",
"jest-teamcity-reporter": "0.9.0",
"ts-jest": "29.4.11"
"ts-jest": "29.4.11",
"uuid": "14.0.0"
},
"overrides": {
"uuid": "14.0.0"
}
}
43 changes: 43 additions & 0 deletions core/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2023-2026 LabKey Corporation. All rights reserved. No portion of this work may be reproduced
* in any form or by any electronic or mechanical means without written permission from LabKey Corporation.
*/
module.exports = {
globals: {
LABKEY: {
contextPath: '/labkey',
container: {
path: '/DefaultTestContainer',
formats: {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm',
timeFormat: 'HH:mm',
},
},
user: {
displayName: 'Bill',
id: 1004,
},
},
},
moduleFileExtensions: ['ts', 'tsx', 'js'],
moduleNameMapper: {
'\\.(scss|css)$': '<rootDir>/test/js/styleMock.js',
},
// This is actually the default configuration for reporters, but for some reason with our modules it gets wiped out
// and then there is no test summary when failures happen, which means that you'll almost never see what tests
// failed unless they were the last tests to run.
reporters: [['default', { summaryThreshold: 10 }]],
setupFilesAfterEnv: ['./test/js/setup.ts'],
testEnvironment: 'jsdom',
testRegex: '(\\.(test))\\.(ts|tsx)$',
testResultsProcessor: 'jest-teamcity-reporter',
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: 'node_modules/@labkey/build/webpack/tsconfig.test.json',
},
],
},
};
Loading