n8n/packages/cli/test/integration/shared/constants.ts
कारतोफ्फेलस्क्रिप्ट™ b895ba438a
refactor(core): Reduce boilterplate code in between tests 🧹, and fix the tests in node.js 20 (no-changelog) (#6654)
refactor(core): Reduce boilterplate code in between tests

also cleaned up some imports, and fixed the tests in node.js 20
2023-07-13 10:14:48 +02:00

41 lines
828 B
TypeScript

import config from '@/config';
export const REST_PATH_SEGMENT = config.getEnv('endpoints.rest');
export const PUBLIC_API_REST_PATH_SEGMENT = config.getEnv('publicApi.path');
export const AUTHLESS_ENDPOINTS: Readonly<string[]> = [
'healthz',
'metrics',
config.getEnv('endpoints.webhook'),
config.getEnv('endpoints.webhookWaiting'),
config.getEnv('endpoints.webhookTest'),
];
export const SUCCESS_RESPONSE_BODY = {
data: {
success: true,
},
} as const;
export const LOGGED_OUT_RESPONSE_BODY = {
data: {
loggedOut: true,
},
};
export const COMMUNITY_PACKAGE_VERSION = {
CURRENT: '0.1.0',
UPDATED: '0.2.0',
};
export const COMMUNITY_NODE_VERSION = {
CURRENT: 1,
UPDATED: 2,
};
/**
* Timeout (in milliseconds) to account for DB being slow to initialize.
*/
export const DB_INITIALIZATION_TIMEOUT = 30_000;