UNPKG

@buddy-works/unit-tests

Version:

Universal test results collector for Jest, Jasmine, Mocha, Cypress, Playwright, and Vitest that sends results to Buddy Works API in real-time

40 lines (39 loc) 1.25 kB
declare const environmentConfig: { readonly BUDDY_UT_TOKEN: { readonly type: "string"; readonly required: true; readonly secret: true; }; readonly CI: { readonly type: "boolean"; }; readonly BUDDY_LOGGER_LEVEL: { readonly type: "string"; }; readonly BUDDY_DEV_LOGGER: { readonly type: "string"; }; readonly BUDDY_API_URL: { readonly type: "string"; }; readonly BUDDY_SESSION_ID: { readonly type: "string"; }; readonly BUDDY_API_FAILURE: { readonly type: "boolean"; }; }; type EnvironmentConfig = { [K in keyof typeof environmentConfig]: (typeof environmentConfig)[K]['type'] extends 'boolean' ? boolean : (typeof environmentConfig)[K] extends { required: true; } ? string : string | undefined; }; interface EnvironmentResult { error?: unknown; variables: EnvironmentConfig; } declare function setEnvironmentVariable<K extends keyof typeof environmentConfig>(key: K, value: EnvironmentConfig[K]): void; declare const _default: EnvironmentConfig; export default _default; export declare const environmentError: unknown; export { setEnvironmentVariable, environmentConfig, type EnvironmentResult };