import { deriveAliasesForJest } from '@-xun/project'; import type { Config as JestConfig } from 'jest'; export type { JestConfig }; /** * {@symbiote/notExtraneous * - babel-jest * - @types/jest * - jest-circus * - jest-extended * - jest-silent-reporter * } */ /** * An array of NODE_ENV values recognized by this configuration file. */ export declare const wellKnownNodeEnvValues: readonly ["test"]; /** * Return a partial configuration that must be initialized further. */ export declare function baseConfig({ isDebugging }: { /** * @default false */ isDebugging?: boolean; }): { readonly restoreMocks: true; readonly resetMocks: true; readonly clearMocks: true; readonly testEnvironment: "node"; readonly testRunner: "jest-circus/runner"; readonly testTimeout: number; readonly maxConcurrency: number; readonly verbose: false; readonly testPathIgnorePatterns: ["/node_modules/", "/dist/", "/.next/", "/.wrangler/", "/src/", ...string[], "/test/fixtures/", "/dummies/", string, string]; readonly setupFilesAfterEnv: ["/test/setup.js" | "/test/setup.ts"]; readonly modulePathIgnorePatterns: ["/dist/", "/.next/", "/.wrangler/", "/test/fixtures/", ...string[], string]; }; /** * @see {@link assertEnvironment} */ export declare function moduleExport({ derivedAliases: moduleNameMapper, isDebugging, skipSlowTestsLevel }: { derivedAliases: ReturnType; isDebugging: boolean; /** * Skip slow tests depending on the level given. `0` disables test skipping. * `1` implements the skip by augmenting jest globals. `2` has the same effect * as `1` while entirely skipping tests from files with names containing * `-slow.`. */ skipSlowTestsLevel: number; }): JestConfig; export declare const transformer: import("../../assets.js").Transformer; /** * @see {@link moduleExport} */ export declare function assertEnvironment(): Omit[0], 'derivedAliases'>; /** * This function prepends a single regular expression _pattern string_ to * {@link JestConfig.transformIgnorePatterns} in `config`. This will result in * any packages _within `node_modules`_ with names matching `packageNames` being * transpiled into CJS on the fly while preserving jest's default behavior (i.e. * no transpilation) in every other case. * * This is useful when, for instance, an ESM package needs to be mocked via a * top-level import. * * Note that package names will have any special characters (in the context of * regular expressions) escaped. If you wish to supply a regular expression as a * package name, pass a {@link RegExp} instance to `packageNames`. However, be * aware that (1) only the {@link RegExp.source} of custom regular expressions * is used (wrapped in parentheses) and (2) the syntax of any custom regular * expressions must not clash with the expression that encloses them or the * behavior of this function becomes undefined. * * Also note that, if yarn pnp support is desired (which is enabled by default * in jest but disabled when using this function), you must ensure the following * is present in `config` before invoking this function: * * ```typescript * transformIgnorePatterns: [String.raw`\.pnp\.[^\/]+$`] * ``` * * @see https://jestjs.io/docs/configuration#transformignorepatterns-arraystring */ export declare function transformSelectEsmPackagesToCjs(config: JestConfig, packageNames: (string | RegExp)[]): void;