mirror of
https://github.com/outline/outline.git
synced 2026-01-06 02:59:54 -06:00
* chore: refactor server test setup * Close dangling redis connections instead of mocking rate limiter specific modules * Segregate pre and post env test setup * fix: remove mock file
89 lines
2.2 KiB
JSON
89 lines
2.2 KiB
JSON
{
|
|
"projects": [
|
|
{
|
|
"displayName": "server",
|
|
"verbose": false,
|
|
"roots": [
|
|
"<rootDir>/server"
|
|
],
|
|
"moduleNameMapper": {
|
|
"^@server/(.*)$": "<rootDir>/server/$1",
|
|
"^@shared/(.*)$": "<rootDir>/shared/$1"
|
|
},
|
|
"setupFiles": [
|
|
"<rootDir>/__mocks__/console.js",
|
|
"<rootDir>/server/test/env.ts"
|
|
],
|
|
"setupFilesAfterEnv": [
|
|
"<rootDir>/server/test/setup.ts"
|
|
],
|
|
"testEnvironment": "node",
|
|
"runner": "@getoutline/jest-runner-serial"
|
|
},
|
|
{
|
|
"displayName": "app",
|
|
"verbose": false,
|
|
"roots": [
|
|
"<rootDir>/app"
|
|
],
|
|
"moduleNameMapper": {
|
|
"^~/(.*)$": "<rootDir>/app/$1",
|
|
"^@shared/(.*)$": "<rootDir>/shared/$1",
|
|
"^.*[.](gif|ttf|eot|svg)$": "<rootDir>/__test__/fileMock.js",
|
|
"^uuid$": "<rootDir>/node_modules/uuid/dist/index.js"
|
|
},
|
|
"modulePaths": [
|
|
"<rootDir>/app"
|
|
],
|
|
"setupFiles": [
|
|
"<rootDir>/__mocks__/window.js"
|
|
],
|
|
"setupFilesAfterEnv": [
|
|
"<rootDir>/app/test/setup.ts"
|
|
],
|
|
"testEnvironment": "jsdom",
|
|
"testEnvironmentOptions": {
|
|
"url": "http://localhost"
|
|
}
|
|
},
|
|
{
|
|
"displayName": "shared-node",
|
|
"verbose": false,
|
|
"roots": [
|
|
"<rootDir>/shared"
|
|
],
|
|
"moduleNameMapper": {
|
|
"^@server/(.*)$": "<rootDir>/server/$1",
|
|
"^@shared/(.*)$": "<rootDir>/shared/$1"
|
|
},
|
|
"setupFiles": [
|
|
"<rootDir>/__mocks__/console.js"
|
|
],
|
|
"setupFilesAfterEnv": [
|
|
"<rootDir>/shared/test/setup.ts"
|
|
],
|
|
"testEnvironment": "node"
|
|
},
|
|
{
|
|
"displayName": "shared-jsdom",
|
|
"verbose": false,
|
|
"roots": [
|
|
"<rootDir>/shared"
|
|
],
|
|
"moduleNameMapper": {
|
|
"^~/(.*)$": "<rootDir>/app/$1",
|
|
"^@shared/(.*)$": "<rootDir>/shared/$1",
|
|
"^.*[.](gif|ttf|eot|svg)$": "<rootDir>/__test__/fileMock.js",
|
|
"^uuid$": "<rootDir>/node_modules/uuid/dist/index.js"
|
|
},
|
|
"setupFiles": [
|
|
"<rootDir>/__mocks__/window.js"
|
|
],
|
|
"testEnvironment": "jsdom",
|
|
"testEnvironmentOptions": {
|
|
"url": "http://localhost"
|
|
}
|
|
}
|
|
]
|
|
}
|