forked from ethereum/remix-live
-
Notifications
You must be signed in to change notification settings - Fork 0
/
3397.0.36.3.1697209639220.js
2 lines (2 loc) · 93.5 KB
/
3397.0.36.3.1697209639220.js
1
2
"use strict";(self["webpackChunk"]=self["webpackChunk"]||[]).push([[3397],{3397:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__="// Type definitions for mocha 9.1\n// Project: https://mochajs.org\n// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid>\n// otiai10 <https://github.com/otiai10>\n// Vadim Macagon <https://github.com/enlight>\n// Andrew Bradley <https://github.com/cspotcode>\n// Dmitrii Sorin <https://github.com/1999>\n// Noah Hummel <https://github.com/strangedev>\n// nicojs <https://github.com/nicojs>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n// TypeScript Version: 2.1\n\n/**\n * Mocha API\n *\n * @see https://mochajs.org/api/mocha\n */\ndeclare class Mocha {\n private _growl;\n private _reporter;\n private _ui;\n\n constructor(options?: Mocha.MochaOptions);\n\n suite: Mocha.Suite;\n files: string[];\n options: Mocha.MochaInstanceOptions;\n\n /**\n * Add test `file`.\n *\n * @see https://mochajs.org/api/mocha#addFile\n */\n addFile(file: string): this;\n\n /**\n * Enable or disable bailing on the first failure.\n *\n * @see https://mochajs.org/api/mocha#bail\n */\n bail(bail?: boolean): this;\n\n /**\n * Enables or disables whether or not to dispose after each test run.\n * Disable this to ensure you can run the test suite multiple times.\n * If disabled, be sure to dispose mocha when you're done to prevent memory leaks.\n *\n * @see https://mochajs.org/api/mocha#cleanReferencesAfterRun\n */\n cleanReferencesAfterRun(clean?: boolean): this;\n\n /**\n * Manually dispose this mocha instance. Mark this instance as `disposed` and unable to run more tests.\n * It also removes function references to tests functions and hooks, so variables trapped in closures can be cleaned by the garbage collector.\n *\n * @see https://mochajs.org/api/mocha#dispose\n */\n dispose(): void;\n\n /**\n * Set reporter to one of the built-in reporters.\n *\n * @see https://mochajs.org/api/mocha#reporter\n */\n reporter(reporter: Mocha.Reporter, reporterOptions?: any): this;\n\n /**\n * Set reporter to the provided constructor, one of the built-in reporters, or loads a reporter\n * from a module path. Defaults to `\"spec\"`.\n *\n * @see https://mochajs.org/api/mocha#reporter\n */\n reporter(reporter?: string | Mocha.ReporterConstructor, reporterOptions?: any): this;\n\n /**\n * Set test UI to one of the built-in test interfaces.\n *\n * @see https://mochajs.org/api/mocha#ui\n */\n ui(name: Mocha.Interface): this;\n\n /**\n * Set test UI to one of the built-in test interfaces or loads a test interface from a module\n * path. Defaults to `\"bdd\"`.\n *\n * @see https://mochajs.org/api/mocha#ui\n */\n ui(name?: string): this;\n\n /**\n * Escape string and add it to grep as a RegExp.\n *\n * @see https://mochajs.org/api/mocha#fgrep\n */\n fgrep(str: string): this;\n\n /**\n * Add regexp to grep, if `re` is a string it is escaped.\n *\n * @see https://mochajs.org/api/mocha#grep\n */\n grep(re: string | RegExp): this;\n\n /**\n * Whether to activate dry-run mode.\n *\n * @param dryRun Whether to activate dry-run mode. Defaults to `true`.\n */\n dryRun(dryRun?: boolean): this;\n\n /**\n * Invert `.grep()` matches.\n *\n * @see https://mochajs.org/api/mocha#invert\n */\n invert(): this;\n\n /**\n * Enable global leak checking.\n *\n * @see https://mochajs.org/api/mocha#checkLeaks\n */\n checkLeaks(): this;\n\n /**\n * Display long stack-trace on failing\n *\n * @see https://mochajs.org/api/mocha#fullTrace\n */\n fullTrace(): this;\n\n /**\n * Enable growl support.\n *\n * @see https://mochajs.org/api/mocha#growl\n */\n growl(): this;\n\n /**\n * Ignore `globals` array or string.\n *\n * @see https://mochajs.org/api/mocha#globals\n */\n globals(globals: string | ReadonlyArray<string>): this;\n\n /**\n * Set the timeout in milliseconds.\n *\n * @see https://mochajs.org/api/mocha#timeout\n */\n timeout(timeout: string | number): this;\n\n /**\n * Set the number of times to retry failed tests.\n *\n * @see https://mochajs.org/api/mocha#retries\n */\n retries(n: number): this;\n\n /**\n * Set slowness threshold in milliseconds.\n *\n * @see https://mochajs.org/api/mocha#slow\n */\n slow(slow: string | number): this;\n\n /**\n * Makes all tests async (accepting a callback)\n *\n * @see https://mochajs.org/api/mocha#asyncOnly.\n */\n asyncOnly(): this;\n\n /**\n * Disable syntax highlighting (in browser).\n *\n * @see https://mochajs.org/api/mocha#noHighlighting\n */\n noHighlighting(): this;\n\n /**\n * Enable uncaught errors to propagate (in browser).\n *\n * @see https://mochajs.org/api/mocha#allowUncaught\n */\n allowUncaught(): boolean;\n\n /**\n * Delay root suite execution.\n *\n * @see https://mochajs.org/api/mocha#delay\n */\n delay(): boolean;\n\n /**\n * Tests marked only fail the suite\n *\n * @see https://mochajs.org/api/mocha#forbidOnly\n */\n forbidOnly(): boolean;\n\n /**\n * Pending tests and tests marked skip fail the suite\n *\n * @see https://mochajs.org/api/mocha#forbidPending\n */\n forbidPending(): boolean;\n\n /**\n * Run tests and invoke `fn()` when complete.\n *\n * Note that `run` relies on Node's `require` to execute\n * the test interface functions and will be subject to the\n * cache - if the files are already in the `require` cache,\n * they will effectively be skipped. Therefore, to run tests\n * multiple times or to run tests in files that are already\n * in the `require` cache, make sure to clear them from the\n * cache first in whichever manner best suits your needs.\n *\n * @see https://mochajs.org/api/mocha#run\n */\n run(fn?: (failures: number) => void): Mocha.Runner;\n\n /**\n * Loads ESM (and CJS) test files asynchronously.\n *\n * @see https://mochajs.org/api/mocha#loadFilesAsync\n */\n loadFilesAsync(): Promise<void>;\n\n /**\n * Load registered files.\n *\n * @see https://mochajs.org/api/mocha#loadFiles\n */\n protected loadFiles(fn?: () => void): void;\n\n /**\n * Unloads `files` from Node's `require` cache.\n *\n * This allows required files to be \"freshly\" reloaded, providing the ability\n * to reuse a Mocha instance programmatically.\n * Note: does not clear ESM module files from the cache\n */\n unloadFiles(): this;\n\n /**\n * Toggles parallel mode.\n *\n * Must be run before calling `run`. Changes the `Runner` class to\n * use; also enables lazy file loading if not already done so.\n *\n * @see https://mochajs.org/api/mocha#parallelMode\n */\n parallelMode(enabled?: boolean): this;\n\n /**\n * Assigns hooks to the root suite.\n *\n * @see https://mochajs.org/api/mocha#rootHooks\n */\n rootHooks(hooks: Mocha.RootHookObject): this;\n\n /**\n * Configures one or more global setup fixtures.\n * If given no parameters, unsets any previously-set fixtures.\n *\n * @see https://mochajs.org/api/mocha#globalSetup\n */\n globalSetup: Mocha.HookFunction;\n\n /**\n * Configures one or more global teardown fixtures.\n * If given no parameters, unsets any previously-set fixtures.\n *\n * @see https://mochajs.org/api/mocha#globalTeardown\n */\n globalTeardown: Mocha.HookFunction;\n\n /**\n * Returns `true` if one or more global setup fixtures have been supplied\n *\n * @see https://mochajs.org/api/mocha#hasGlobalSetupFixtures\n */\n hasGlobalSetupFixtures(): boolean;\n\n /**\n * Returns `true` if one or more global teardown fixtures have been supplied\n *\n * @see https://mochajs.org/api/mocha#hasGlobalTeardownFixtures\n */\n hasGlobalTeardownFixtures(): boolean;\n\n /**\n * Toggle execution of any global setup fixture(s)\n *\n * @see https://mochajs.org/api/mocha#enableGlobalSetup\n */\n enableGlobalSetup(enabled: boolean): this;\n\n /**\n * Toggle execution of any global teardown fixture(s)\n *\n * @see https://mochajs.org/api/mocha#enableGlobalTeardown\n */\n enableGlobalTeardown(enabled: boolean): this;\n}\n\ndeclare namespace Mocha {\n namespace utils {\n /**\n * Compute a slug from the given `str`.\n *\n * @see https://mochajs.org/api/module-utils.html#.slug\n */\n function slug(str: string): string;\n\n /**\n * Strip the function definition from `str`, and re-indent for pre whitespace.\n *\n * @see https://mochajs.org/api/module-utils.html#.clean\n */\n function clean(str: string): string;\n\n /**\n * Highlight the given string of `js`.\n */\n function highlight(js: string): string;\n\n /**\n * Takes some variable and asks `Object.prototype.toString()` what it thinks it is.\n */\n function type(value: any): string;\n\n /**\n * Stringify `value`. Different behavior depending on type of value:\n *\n * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively.\n * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes.\n * - If `value` is an *empty* object, function, or array, returns `'{}'`, `'[Function]'`, or `'[]'` respectively.\n * - If `value` has properties, call canonicalize} on it, then return result of `JSON.stringify()`\n *\n * @see https://mochajs.org/api/module-utils.html#.stringify\n */\n function stringify(value: any): string;\n\n /**\n * Return a new Thing that has the keys in sorted order. Recursive.\n *\n * If the Thing...\n * - has already been seen, return string `'[Circular]'`\n * - is `undefined`, return string `'[undefined]'`\n * - is `null`, return value `null`\n * - is some other primitive, return the value\n * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method\n * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again.\n * - is an empty `Array`, `Object`, or `Function`, returns `'[]'`, `'{}'`, or `'[Function]'` respectively.\n *\n * @see https://mochajs.org/api/module-utils.html#.canonicalize\n */\n function canonicalize(value: any, stack: any[], typeHint: string): any;\n\n /**\n * Generate an undefined error with a message warning the user.\n *\n * @see https://mochajs.org/api/module-utils.html#.undefinedError\n */\n function undefinedError(): Error;\n\n /**\n * Generate an undefined error if `err` is not defined.\n *\n * @see https://mochajs.org/api/module-utils.html#.getError\n */\n function getError(err: Error | undefined): Error;\n\n /**\n * When invoking this function you get a filter function that get the Error.stack as an\n * input, and return a prettify output. (i.e: strip Mocha and internal node functions from\n * stack trace).\n *\n * @see https://mochajs.org/api/module-utils.html#.stackTraceFilter\n */\n function stackTraceFilter(): (stack: string) => string;\n }\n\n namespace interfaces {\n function bdd(suite: Suite): void;\n function tdd(suite: Suite): void;\n function qunit(suite: Suite): void;\n function exports(suite: Suite): void;\n }\n\n // #region Test interface augmentations\n\n interface HookFunction {\n /**\n * [bdd, qunit, tdd] Describe a \"hook\" to execute the given callback `fn`. The name of the\n * function is used as the name of the hook.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (fn: Func): void;\n\n /**\n * [bdd, qunit, tdd] Describe a \"hook\" to execute the given callback `fn`. The name of the\n * function is used as the name of the hook.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (fn: AsyncFunc): void;\n\n /**\n * [bdd, qunit, tdd] Describe a \"hook\" to execute the given `title` and callback `fn`.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (name: string, fn?: Func): void;\n\n /**\n * [bdd, qunit, tdd] Describe a \"hook\" to execute the given `title` and callback `fn`.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (name: string, fn?: AsyncFunc): void;\n }\n\n interface SuiteFunction {\n /**\n * [bdd, tdd] Describe a \"suite\" with the given `title` and callback `fn` containing\n * nested suites.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (title: string, fn: (this: Suite) => void): Suite;\n\n /**\n * [qunit] Describe a \"suite\" with the given `title`.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (title: string): Suite;\n\n /**\n * [bdd, tdd, qunit] Indicates this suite should be executed exclusively.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n only: ExclusiveSuiteFunction;\n\n /**\n * [bdd, tdd] Indicates this suite should not be executed.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n skip: PendingSuiteFunction;\n }\n\n interface ExclusiveSuiteFunction {\n /**\n * [bdd, tdd] Describe a \"suite\" with the given `title` and callback `fn` containing\n * nested suites. Indicates this suite should be executed exclusively.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (title: string, fn: (this: Suite) => void): Suite;\n\n /**\n * [qunit] Describe a \"suite\" with the given `title`. Indicates this suite should be executed\n * exclusively.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (title: string): Suite;\n }\n\n /**\n * [bdd, tdd] Describe a \"suite\" with the given `title` and callback `fn` containing\n * nested suites. Indicates this suite should not be executed.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @returns [bdd] `Suite`\n * @returns [tdd] `void`\n */\n interface PendingSuiteFunction {\n (title: string, fn: (this: Suite) => void): Suite | void;\n }\n\n interface TestFunction {\n /**\n * Describe a specification or test-case with the given callback `fn` acting as a thunk.\n * The name of the function is used as the name of the test.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (fn: Func): Test;\n\n /**\n * Describe a specification or test-case with the given callback `fn` acting as a thunk.\n * The name of the function is used as the name of the test.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (fn: AsyncFunc): Test;\n\n /**\n * Describe a specification or test-case with the given `title` and callback `fn` acting\n * as a thunk.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (title: string, fn?: Func): Test;\n\n /**\n * Describe a specification or test-case with the given `title` and callback `fn` acting\n * as a thunk.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (title: string, fn?: AsyncFunc): Test;\n\n /**\n * Indicates this test should be executed exclusively.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n only: ExclusiveTestFunction;\n\n /**\n * Indicates this test should not be executed.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n skip: PendingTestFunction;\n\n /**\n * Number of attempts to retry.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n retries(n: number): void;\n }\n\n interface ExclusiveTestFunction {\n /**\n * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn`\n * acting as a thunk. The name of the function is used as the name of the test. Indicates\n * this test should be executed exclusively.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (fn: Func): Test;\n\n /**\n * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn`\n * acting as a thunk. The name of the function is used as the name of the test. Indicates\n * this test should be executed exclusively.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (fn: AsyncFunc): Test;\n\n /**\n * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and\n * callback `fn` acting as a thunk. Indicates this test should be executed exclusively.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (title: string, fn?: Func): Test;\n\n /**\n * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and\n * callback `fn` acting as a thunk. Indicates this test should be executed exclusively.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (title: string, fn?: AsyncFunc): Test;\n }\n\n interface PendingTestFunction {\n /**\n * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn`\n * acting as a thunk. The name of the function is used as the name of the test. Indicates\n * this test should not be executed.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (fn: Func): Test;\n\n /**\n * [bdd, tdd, qunit] Describe a specification or test-case with the given callback `fn`\n * acting as a thunk. The name of the function is used as the name of the test. Indicates\n * this test should not be executed.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (fn: AsyncFunc): Test;\n\n /**\n * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and\n * callback `fn` acting as a thunk. Indicates this test should not be executed.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (title: string, fn?: Func): Test;\n\n /**\n * [bdd, tdd, qunit] Describe a specification or test-case with the given `title` and\n * callback `fn` acting as a thunk. Indicates this test should not be executed.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n (title: string, fn?: AsyncFunc): Test;\n }\n\n /**\n * Execute after each test case.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#afterEach\n */\n let afterEach: HookFunction;\n\n /**\n * Execute after running tests.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#after\n */\n let after: HookFunction;\n\n /**\n * Execute before each test case.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#beforeEach\n */\n let beforeEach: HookFunction;\n\n /**\n * Execute before running tests.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#before\n */\n let before: HookFunction;\n\n /**\n * Describe a \"suite\" containing nested suites and tests.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n let describe: SuiteFunction;\n\n /**\n * Describes a test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n let it: TestFunction;\n\n /**\n * Describes a pending test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n let xit: PendingTestFunction;\n\n /**\n * Execute before each test case.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#beforeEach\n */\n let setup: HookFunction;\n\n /**\n * Execute before running tests.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#before\n */\n let suiteSetup: HookFunction;\n\n /**\n * Execute after running tests.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#after\n */\n let suiteTeardown: HookFunction;\n\n /**\n * Describe a \"suite\" containing nested suites and tests.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n let suite: SuiteFunction;\n\n /**\n * Execute after each test case.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#afterEach\n */\n let teardown: HookFunction;\n\n /**\n * Describes a test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n let test: TestFunction;\n\n /**\n * Triggers root suite execution.\n *\n * - _Only available if flag --delay is passed into Mocha._\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#runWithSuite\n */\n function run(): void;\n\n // #endregion Test interface augmentations\n\n namespace reporters {\n /**\n * Initialize a new `Base` reporter.\n *\n * All other reporters generally inherit from this reporter, providing stats such as test duration,\n * number of tests passed / failed, etc.\n *\n * @see https://mochajs.org/api/Mocha.reporters.Base.html\n */\n class Base {\n constructor(runner: Runner, options?: MochaOptions);\n\n /**\n * Test run statistics\n */\n stats: Stats;\n\n /**\n * Test failures\n */\n failures: Test[];\n\n /**\n * The configured runner\n */\n runner: Runner;\n\n /**\n * Output common epilogue used by many of the bundled reporters.\n *\n * @see https://mochajs.org/api/Mocha.reporters.Base.html#.Base#epilogue\n */\n epilogue(): void;\n\n done?(failures: number, fn?: (failures: number) => void): void;\n }\n\n namespace Base {\n /**\n * Enables coloring by default\n *\n * @see https://mochajs.org/api/module-base#.useColors\n */\n let useColors: boolean;\n\n /**\n * Inline diffs instead of +/-\n *\n * @see https://mochajs.org/api/module-base#.inlineDiffs\n */\n let inlineDiffs: boolean;\n\n /**\n * Default color map\n *\n * @see https://mochajs.org/api/module-base#.colors\n */\n const colors: ColorMap;\n\n /**\n * Default color map\n *\n * @see https://mochajs.org/api/module-base#.colors\n */\n interface ColorMap {\n // added by Base\n pass: number;\n fail: number;\n 'bright pass': number;\n 'bright fail': number;\n 'bright yellow': number;\n pending: number;\n suite: number;\n 'error title': number;\n 'error message': number;\n 'error stack': number;\n checkmark: number;\n fast: number;\n medium: number;\n slow: number;\n green: number;\n light: number;\n 'diff gutter': number;\n 'diff added': number;\n 'diff removed': number;\n\n // added by Progress\n progress: number;\n\n // added by Landing\n plane: number;\n 'plane crash': number;\n runway: number;\n\n [key: string]: number;\n }\n\n /**\n * Default symbol map\n *\n * @see https://mochajs.org/api/module-base#.symbols\n */\n const symbols: SymbolMap;\n\n /**\n * Default symbol map\n *\n * @see https://mochajs.org/api/module-base#.symbols\n */\n interface SymbolMap {\n ok: string;\n err: string;\n dot: string;\n comma: string;\n bang: string;\n [key: string]: string;\n }\n\n /**\n * Color `str` with the given `type` (from `colors`)\n *\n * @see https://mochajs.org/api/module-base#.color\n */\n function color(type: string, str: string): string;\n\n /**\n * Expose terminal window size\n *\n * @see https://mochajs.org/api/module-base#.window\n */\n const window: {\n width: number;\n };\n\n /**\n * ANSI TTY control sequences common among reporters.\n *\n * @see https://mochajs.org/api/module-base#.cursor\n */\n namespace cursor {\n /**\n * Hides the cursor\n */\n function hide(): void;\n\n /**\n * Shows the cursor\n */\n function show(): void;\n\n /**\n * Deletes the current line\n */\n function deleteLine(): void;\n\n /**\n * Moves to the beginning of the line\n */\n function beginningOfLine(): void;\n\n /**\n * Clears the line and moves to the beginning of the line.\n */\n function CR(): void;\n }\n\n /**\n * Returns a diff between two strings with colored ANSI output.\n *\n * @see https://mochajs.org/api/module-base#.generateDiff\n */\n function generateDiff(actual: string, expected: string): string;\n\n /**\n * Output the given `failures` as a list.\n *\n * @see https://mochajs.org/api/Mocha.reporters.Base.html#.exports.list1\n */\n function list(failures: Test[]): void;\n }\n\n /**\n * Initialize a new `Dot` matrix test reporter.\n *\n * @see https://mochajs.org/api/Mocha.reporters.Dot.html\n */\n class Dot extends Base {}\n\n /**\n * Initialize a new `Doc` reporter.\n *\n * @see https://mochajs.org/api/Mocha.reporters.Doc.html\n */\n class Doc extends Base {}\n\n /**\n * Initialize a new `TAP` test reporter.\n *\n * @see https://mochajs.org/api/Mocha.reporters.TAP.html\n */\n class TAP extends Base {}\n\n /**\n * Initialize a new `JSON` reporter\n *\n * @see https://mochajs.org/api/Mocha.reporters.JSON.html\n */\n class JSON extends Base {}\n\n /**\n * Initialize a new `HTML` reporter.\n *\n * - _This reporter cannot be used on the console._\n *\n * @see https://mochajs.org/api/Mocha.reporters.HTML.html\n */\n class HTML extends Base {\n /**\n * Provide suite URL.\n *\n * @see https://mochajs.org/api/Mocha.reporters.HTML.html#suiteURL\n */\n suiteURL(suite: Suite): string;\n\n /**\n * Provide test URL.\n *\n * @see https://mochajs.org/api/Mocha.reporters.HTML.html#testURL\n */\n testURL(test: Test): string;\n\n /**\n * Adds code toggle functionality for the provided test's list element.\n *\n * @see https://mochajs.org/api/Mocha.reporters.HTML.html#addCodeToggle\n */\n addCodeToggle(el: HTMLLIElement, contents: string): void;\n }\n\n /**\n * Initialize a new `List` test reporter.\n *\n * @see https://mochajs.org/api/Mocha.reporters.List.html\n */\n class List extends Base {}\n\n /**\n * Initialize a new `Min` minimal test reporter (best used with --watch).\n *\n * @see https://mochajs.org/api/Mocha.reporters.Min.html\n */\n class Min extends Base {}\n\n /**\n * Initialize a new `Spec` test reporter.\n *\n * @see https://mochajs.org/api/Mocha.reporters.Spec.html\n */\n class Spec extends Base {}\n\n /**\n * Initialize a new `NyanCat` test reporter.\n *\n * @see https://mochajs.org/api/Mocha.reporters.Nyan.html\n */\n class Nyan extends Base {\n private colorIndex;\n private numberOfLines;\n private rainbowColors;\n private scoreboardWidth;\n private tick;\n private trajectories;\n private trajectoryWidthMax;\n private draw;\n private drawScoreboard;\n private appendRainbow;\n private drawRainbow;\n private drawNyanCat;\n private face;\n private cursorUp;\n private cursorDown;\n private generateColors;\n private rainbowify;\n }\n\n /**\n * Initialize a new `XUnit` test reporter.\n *\n * @see https://mochajs.org/api/Mocha.reporters.XUnit.html\n */\n class XUnit extends Base {\n constructor(runner: Runner, options?: XUnit.MochaOptions);\n\n /**\n * Override done to close the stream (if it's a file).\n *\n * @see https://mochajs.org/api/Mocha.reporters.XUnit.html#done\n */\n done(failures: number, fn: (failures: number) => void): void;\n\n /**\n * Write out the given line.\n *\n * @see https://mochajs.org/api/Mocha.reporters.XUnit.html#write\n */\n write(line: string): void;\n\n /**\n * Output tag for the given `test.`\n *\n * @see https://mochajs.org/api/Mocha.reporters.XUnit.html#test\n */\n test(test: Test): void;\n }\n\n namespace XUnit {\n interface MochaOptions extends Mocha.MochaOptions {\n reporterOptions?: ReporterOptions | undefined;\n }\n\n interface ReporterOptions {\n output?: string | undefined;\n suiteName?: string | undefined;\n }\n }\n\n /**\n * Initialize a new `Markdown` test reporter.\n *\n * @see https://mochajs.org/api/Mocha.reporters.Markdown.html\n */\n class Markdown extends Base {}\n\n /**\n * Initialize a new `Progress` bar test reporter.\n *\n * @see https://mochajs.org/api/Mocha.reporters.Progress.html\n */\n class Progress extends Base {\n constructor(runner: Runner, options?: Progress.MochaOptions);\n }\n\n namespace Progress {\n interface MochaOptions extends Mocha.MochaOptions {\n reporterOptions?: ReporterOptions | undefined;\n }\n\n interface ReporterOptions {\n open?: string | undefined;\n complete?: string | undefined;\n incomplete?: string | undefined;\n close?: string | undefined;\n verbose?: boolean | undefined;\n }\n }\n\n /**\n * Initialize a new `Landing` reporter.\n *\n * @see https://mochajs.org/api/Mocha.reporters.Landing.html\n */\n class Landing extends Base {}\n\n /**\n * Initialize a new `JSONStream` test reporter.\n *\n * @see https://mochajs.org/api/Mocha.reporters.JSONStream.html\n */\n class JSONStream extends Base {}\n\n // value-only aliases\n const base: typeof Base;\n const dot: typeof Dot;\n const doc: typeof Doc;\n const tap: typeof TAP;\n const json: typeof JSON;\n const html: typeof HTML;\n const list: typeof List;\n const spec: typeof Spec;\n const nyan: typeof Nyan;\n const xunit: typeof XUnit;\n const markdown: typeof Markdown;\n const progress: typeof Progress;\n const landing: typeof Landing;\n // NOTE: not possible to type this correctly:\n // const \"json-stream\": typeof JSONStream;\n }\n\n /**\n * Initialize a new `Runnable` with the given `title` and callback `fn`.\n *\n * @see https://mochajs.org/api/Runnable.html\n */\n class Runnable {\n private _slow;\n private _retries;\n private _currentRetry;\n private _timeout;\n private _timeoutError;\n\n constructor(title: string, fn?: Func | AsyncFunc);\n\n title: string;\n fn: Func | AsyncFunc | undefined;\n body: string;\n async: boolean;\n sync: boolean;\n timedOut: boolean;\n pending: boolean;\n duration?: number | undefined;\n parent?: Suite | undefined;\n state?: 'failed' | 'passed' | 'pending' | undefined;\n timer?: any;\n ctx?: Context | undefined;\n callback?: Done | undefined;\n allowUncaught?: boolean | undefined;\n file?: string | undefined;\n\n /**\n * Get test timeout.\n *\n * @see https://mochajs.org/api/Runnable.html#timeout\n */\n timeout(): number;\n\n /**\n * Set test timeout.\n *\n * @see https://mochajs.org/api/Runnable.html#timeout\n */\n timeout(ms: string | number): this;\n\n /**\n * Get test slowness threshold.\n *\n * @see https://mochajs.org/api/Runnable.html#slow\n */\n slow(): number;\n\n /**\n * Set test slowness threshold.\n *\n * @see https://mochajs.org/api/Runnable.html#slow\n */\n slow(ms: string | number): this;\n\n /**\n * Halt and mark as pending.\n */\n skip(): never;\n\n /**\n * Check if this runnable or its parent suite is marked as pending.\n *\n * @see https://mochajs.org/api/Runnable.html#isPending\n */\n isPending(): boolean;\n\n /**\n * Return `true` if this Runnable has failed.\n */\n isFailed(): boolean;\n\n /**\n * Return `true` if this Runnable has passed.\n */\n isPassed(): boolean;\n\n /**\n * Set or get number of retries.\n *\n * @see https://mochajs.org/api/Runnable.html#retries\n */\n retries(): number;\n\n /**\n * Set or get number of retries.\n *\n * @see https://mochajs.org/api/Runnable.html#retries\n */\n retries(n: number): void;\n\n /**\n * Set or get current retry\n *\n * @see https://mochajs.org/api/Runnable.html#currentRetry\n */\n protected currentRetry(): number;\n\n /**\n * Set or get current retry\n *\n * @see https://mochajs.org/api/Runnable.html#currentRetry\n */\n protected currentRetry(n: number): void;\n\n /**\n * Return the full title generated by recursively concatenating the parent's full title.\n */\n fullTitle(): string;\n\n /**\n * Return the title path generated by concatenating the parent's title path with the title.\n */\n titlePath(): string[];\n\n /**\n * Clear the timeout.\n *\n * @see https://mochajs.org/api/Runnable.html#clearTimeout\n */\n clearTimeout(): void;\n\n /**\n * Inspect the runnable void of private properties.\n *\n * @see https://mochajs.org/api/Runnable.html#inspect\n */\n inspect(): string;\n\n /**\n * Reset the timeout.\n *\n * @see https://mochajs.org/api/Runnable.html#resetTimeout\n */\n resetTimeout(): void;\n\n /**\n * Get a list of whitelisted globals for this test run.\n *\n * @see https://mochajs.org/api/Runnable.html#globals\n */\n globals(): string[];\n\n /**\n * Set a list of whitelisted globals for this test run.\n *\n * @see https://mochajs.org/api/Runnable.html#globals\n */\n globals(globals: ReadonlyArray<string>): void;\n\n /**\n * Run the test and invoke `fn(err)`.\n *\n * @see https://mochajs.org/api/Runnable.html#run\n */\n run(fn: Done): void;\n }\n\n // #region Runnable \"error\" event\n interface Runnable extends NodeJS.EventEmitter {\n on(event: 'error', listener: (error: any) => void): this;\n once(event: 'error', listener: (error: any) => void): this;\n addListener(event: 'error', listener: (error: any) => void): this;\n removeListener(event: 'error', listener: (error: any) => void): this;\n prependListener(event: 'error', listener: (error: any) => void): this;\n prependOnceListener(event: 'error', listener: (error: any) => void): this;\n emit(name: 'error', error: any): boolean;\n }\n // #endregion Runnable \"error\" event\n // #region Runnable untyped events\n interface Runnable extends NodeJS.EventEmitter {\n on(event: string, listener: (...args: any[]) => void): this;\n once(event: string, listener: (...args: any[]) => void): this;\n addListener(event: string, listener: (...args: any[]) => void): this;\n removeListener(event: string, listener: (...args: any[]) => void): this;\n prependListener(event: string, listener: (...args: any[]) => void): this;\n prependOnceListener(event: string, listener: (...args: any[]) => void): this;\n emit(name: string, ...args: any[]): boolean;\n }\n // #endregion Runnable untyped events\n\n /**\n * Test context\n *\n * @see https://mochajs.org/api/module-Context.html#~Context\n */\n class Context {\n private _runnable;\n\n test?: Runnable | undefined;\n currentTest?: Test | undefined;\n\n /**\n * Get the context `Runnable`.\n */\n runnable(): Runnable;\n\n /**\n * Set the context `Runnable`.\n */\n runnable(runnable: Runnable): this;\n\n /**\n * Get test timeout.\n */\n timeout(): number;\n\n /**\n * Set test timeout.\n */\n timeout(ms: string | number): this;\n\n /**\n * Get test slowness threshold.\n */\n slow(): number;\n\n /**\n * Set test slowness threshold.\n */\n slow(ms: string | number): this;\n\n /**\n * Mark a test as skipped.\n */\n skip(): never;\n\n /**\n * Get the number of allowed retries on failed tests.\n */\n retries(): number;\n\n /**\n * Set the number of allowed retries on failed tests.\n */\n retries(n: number): this;\n\n [key: string]: any;\n }\n\n interface RunnerConstants {\n readonly EVENT_HOOK_BEGIN: 'hook';\n readonly EVENT_HOOK_END: 'hook end';\n readonly EVENT_RUN_BEGIN: 'start';\n readonly EVENT_DELAY_BEGIN: 'waiting';\n readonly EVENT_DELAY_END: 'ready';\n readonly EVENT_RUN_END: 'end';\n readonly EVENT_SUITE_BEGIN: 'suite';\n readonly EVENT_SUITE_END: 'suite end';\n readonly EVENT_TEST_BEGIN: 'test';\n readonly EVENT_TEST_END: 'test end';\n readonly EVENT_TEST_FAIL: 'fail';\n readonly EVENT_TEST_PASS: 'pass';\n readonly EVENT_TEST_PENDING: 'pending';\n readonly EVENT_TEST_RETRY: 'retry';\n readonly STATE_IDLE: 'idle';\n readonly STATE_RUNNING: 'running';\n readonly STATE_STOPPED: 'stopped';\n }\n\n interface RunnerOptions {\n /** Whether to delay execution of root suite until ready. */\n delay?: boolean;\n\n /** Whether to report tests without running them. */\n dryRun?: boolean;\n\n /** Whether to clean references to test fns and hooks when a suite is done. */\n cleanReferencesAfterRun?: boolean;\n }\n\n /**\n * Initialize a `Runner` for the given `suite`.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html\n */\n class Runner {\n private _globals;\n private _abort;\n private _delay;\n private _defaultGrep;\n private next;\n private hookErr;\n private prevGlobalsLength;\n private nextSuite;\n\n static readonly constants: RunnerConstants;\n\n /**\n * Initialize a `Runner` at the Root Suite, which represents a hierarchy of Suites and Tests.\n *\n * @param suite Root suite\n * @param optionsOrDelay Options. If boolean (deprecated), whether or not to delay execution of root suite until ready.\n */\n constructor(suite: Suite, optionsOrDelay?: RunnerOptions | boolean);\n\n suite: Suite;\n started: boolean;\n total: number;\n failures: number;\n asyncOnly?: boolean | undefined;\n allowUncaught?: boolean | undefined;\n fullStackTrace?: boolean | undefined;\n forbidOnly?: boolean | undefined;\n forbidPending?: boolean | undefined;\n checkLeaks?: boolean | undefined;\n test?: Test | undefined;\n currentRunnable?: Runnable | undefined;\n stats?: Stats | undefined; // added by reporters\n\n /**\n * Removes all event handlers set during a run on this instance.\n * Remark: this does *not* clean/dispose the tests or suites themselves.\n *\n * @see https://mochajs.org/api/runner#dispose\n */\n dispose(): void;\n\n /**\n * Run tests with full titles matching `re`. Updates runner.total\n * with number of tests matched.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#grep\n */\n grep(re: RegExp, invert: boolean): this;\n\n /**\n * Returns the number of tests matching the grep search for the\n * given suite.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#grepTotal\n */\n grepTotal(suite: Suite): number;\n\n /**\n * Gets the allowed globals.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#globals\n */\n globals(): string[];\n\n /**\n * Allow the given `arr` of globals.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#globals\n */\n globals(arr: ReadonlyArray<string>): this;\n\n /**\n * Run the root suite and invoke `fn(failures)` on completion.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#run\n */\n run(fn?: (failures: number) => void): this;\n\n /**\n * Cleanly abort execution.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#.Runner#abort\n */\n abort(): this;\n\n /**\n * Handle uncaught exceptions.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#uncaught\n */\n uncaught(err: any): void;\n\n /**\n * Wrapper for setImmediate, process.nextTick, or browser polyfill.\n */\n protected static immediately(callback: Function): void;\n\n /**\n * Return a list of global properties.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#globalProps\n */\n protected globalProps(): string[];\n\n /**\n * Check for global variable leaks.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#checkGlobals\n */\n protected checkGlobals(test: Test): void;\n\n /**\n * Fail the given `test`.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#fail\n */\n protected fail(test: Test, err: any): void;\n\n /**\n * Fail the given `hook` with `err`.\n *\n * Hook failures work in the following pattern:\n * - If bail, then exit\n * - Failed `before` hook skips all tests in a suite and subsuites,\n * but jumps to corresponding `after` hook\n * - Failed `before each` hook skips remaining tests in a\n * suite and jumps to corresponding `after each` hook,\n * which is run only once\n * - Failed `after` hook does not alter\n * execution order\n * - Failed `after each` hook skips remaining tests in a\n * suite and subsuites, but executes other `after each`\n * hooks\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#failHook\n */\n protected failHook(hook: Hook, err: any): void;\n\n /**\n * Run hook `name` callbacks and then invoke `fn()`.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#hook\n */\n protected hook(name: string, fn: () => void): void;\n\n /**\n * Run hook `name` for the given array of `suites`\n * in order, and callback `fn(err, errSuite)`.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#hooks\n */\n protected hooks(name: string, suites: Suite[], fn: (err?: any, errSuite?: Suite) => void): void;\n\n /**\n * Run hooks from the top level down.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#hookUp\n */\n protected hookUp(name: string, fn: (err?: any, errSuite?: Suite) => void): void;\n\n /**\n * Run hooks from the bottom up.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#hookDown\n */\n protected hookDown(name: string, fn: (err?: any, errSuite?: Suite) => void): void;\n\n /**\n * Return an array of parent Suites from closest to furthest.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#parents\n */\n protected parents(): Suite[];\n\n /**\n * Run the current test and callback `fn(err)`.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#runTest\n */\n protected runTest(fn: Done): any;\n\n /**\n * Run tests in the given `suite` and invoke the callback `fn()` when complete.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#runTests\n */\n protected runTests(suite: Suite, fn: (errSuite?: Suite) => void): void;\n\n /**\n * Run the given `suite` and invoke the callback `fn()` when complete.\n *\n * @see https://mochajs.org/api/Mocha.Runner.html#runSuite\n */\n protected runSuite(suite: Suite, fn: (errSuite?: Suite) => void): void;\n }\n\n // #region Runner \"waiting\" event\n interface Runner {\n on(event: 'waiting', listener: (rootSuite: Suite) => void): this;\n once(event: 'waiting', listener: (rootSuite: Suite) => void): this;\n addListener(event: 'waiting', listener: (rootSuite: Suite) => void): this;\n removeListener(event: 'waiting', listener: (rootSuite: Suite) => void): this;\n prependListener(event: 'waiting', listener: (rootSuite: Suite) => void): this;\n prependOnceListener(event: 'waiting', listener: (rootSuite: Suite) => void): this;\n emit(name: 'waiting', rootSuite: Suite): boolean;\n }\n // #endregion Runner \"waiting\" event\n // #region Runner \"start\" event\n interface Runner extends NodeJS.EventEmitter {\n on(event: 'start', listener: () => void): this;\n once(event: 'start', listener: () => void): this;\n addListener(event: 'start', listener: () => void): this;\n removeListener(event: 'start', listener: () => void): this;\n prependListener(event: 'start', listener: () => void): this;\n prependOnceListener(event: 'start', listener: () => void): this;\n emit(name: 'start'): boolean;\n }\n // #endregion Runner \"start\" event\n // #region Runner \"end\" event\n interface Runner extends NodeJS.EventEmitter {\n on(event: 'end', listener: () => void): this;\n once(event: 'end', listener: () => void): this;\n addListener(event: 'end', listener: () => void): this;\n removeListener(event: 'end', listener: () => void): this;\n prependListener(event: 'end', listener: () => void): this;\n prependOnceListener(event: 'end', listener: () => void): this;\n emit(name: 'end'): boolean;\n }\n // #endregion Runner \"end\" event\n // #region Runner \"suite\" event\n interface Runner extends NodeJS.EventEmitter {\n on(event: 'suite', listener: (suite: Suite) => void): this;\n once(event: 'suite', listener: (suite: Suite) => void): this;\n addListener(event: 'suite', listener: (suite: Suite) => void): this;\n removeListener(event: 'suite', listener: (suite: Suite) => void): this;\n prependListener(event: 'suite', listener: (suite: Suite) => void): this;\n prependOnceListener(event: 'suite', listener: (suite: Suite) => void): this;\n emit(name: 'suite', suite: Suite): boolean;\n }\n // #endregion Runner \"suite\" event\n // #region Runner \"suite end\" event\n interface Runner extends NodeJS.EventEmitter {\n on(event: 'suite end', listener: (suite: Suite) => void): this;\n once(event: 'suite end', listener: (suite: Suite) => void): this;\n addListener(event: 'suite end', listener: (suite: Suite) => void): this;\n removeListener(event: 'suite end', listener: (suite: Suite) => void): this;\n prependListener(event: 'suite end', listener: (suite: Suite) => void): this;\n prependOnceListener(event: 'suite end', listener: (suite: Suite) => void): this;\n emit(name: 'suite end', suite: Suite): boolean;\n }\n // #endregion Runner \"suite end\" event\n // #region Runner \"test\" event\n interface Runner extends NodeJS.EventEmitter {\n on(event: 'test', listener: (test: Test) => void): this;\n once(event: 'test', listener: (test: Test) => void): this;\n addListener(event: 'test', listener: (test: Test) => void): this;\n removeListener(event: 'test', listener: (test: Test) => void): this;\n prependListener(event: 'test', listener: (test: Test) => void): this;\n prependOnceListener(event: 'test', listener: (test: Test) => void): this;\n emit(name: 'test', test: Test): boolean;\n }\n // #endregion Runner \"test\" event\n // #region Runner \"test end\" event\n interface Runner extends NodeJS.EventEmitter {\n on(event: 'test end', listener: (test: Test) => void): this;\n once(event: 'test end', listener: (test: Test) => void): this;\n addListener(event: 'test end', listener: (test: Test) => void): this;\n removeListener(event: 'test end', listener: (test: Test) => void): this;\n prependListener(event: 'test end', listener: (test: Test) => void): this;\n prependOnceListener(event: 'test end', listener: (test: Test) => void): this;\n emit(name: 'test end', test: Test): boolean;\n }\n // #endregion Runner \"test end\" event\n // #region Runner \"hook\" event\n interface Runner extends NodeJS.EventEmitter {\n on(event: 'hook', listener: (hook: Hook) => void): this;\n once(event: 'hook', listener: (hook: Hook) => void): this;\n addListener(event: 'hook', listener: (hook: Hook) => void): this;\n removeListener(event: 'hook', listener: (hook: Hook) => void): this;\n prependListener(event: 'hook', listener: (hook: Hook) => void): this;\n prependOnceListener(event: 'hook', listener: (hook: Hook) => void): this;\n emit(name: 'hook', hook: Hook): boolean;\n }\n // #endregion Runner \"hook\" event\n // #region Runner \"hook end\" event\n interface Runner extends NodeJS.EventEmitter {\n on(event: 'hook end', listener: (hook: Hook) => void): this;\n once(event: 'hook end', listener: (hook: Hook) => void): this;\n addListener(event: 'hook end', listener: (hook: Hook) => void): this;\n removeListener(event: 'hook end', listener: (hook: Hook) => void): this;\n prependListener(event: 'hook end', listener: (hook: Hook) => void): this;\n prependOnceListener(event: 'hook end', listener: (hook: Hook) => void): this;\n emit(name: 'hook end', hook: Hook): boolean;\n }\n // #endregion Runner \"hook end\" event\n // #region Runner \"pass\" event\n interface Runner extends NodeJS.EventEmitter {\n on(event: 'pass', listener: (test: Test) => void): this;\n once(event: 'pass', listener: (test: Test) => void): this;\n addListener(event: 'pass', listener: (test: Test) => void): this;\n removeListener(event: 'pass', listener: (test: Test) => void): this;\n prependListener(event: 'pass', listener: (test: Test) => void): this;\n prependOnceListener(event: 'pass', listener: (test: Test) => void): this;\n emit(name: 'pass', test: Test): boolean;\n }\n // #endregion Runner \"pass\" event\n // #region Runner \"fail\" event\n interface Runner extends NodeJS.EventEmitter {\n on(event: 'fail', listener: (test: Test, err: any) => void): this;\n once(event: 'fail', listener: (test: Test, err: any) => void): this;\n addListener(event: 'fail', listener: (test: Test, err: any) => void): this;\n removeListener(event: 'fail', listener: (test: Test, err: any) => void): this;\n prependListener(event: 'fail', listener: (test: Test, err: any) => void): this;\n prependOnceListener(event: 'fail', listener: (test: Test, err: any) => void): this;\n emit(name: 'fail', test: Test, err: any): boolean;\n }\n // #endregion Runner \"fail\" event\n // #region Runner \"pending\" event\n interface Runner extends NodeJS.EventEmitter {\n on(event: 'pending', listener: (test: Test) => void): this;\n once(event: 'pending', listener: (test: Test) => void): this;\n addListener(event: 'pending', listener: (test: Test) => void): this;\n removeListener(event: 'pending', listener: (test: Test) => void): this;\n prependListener(event: 'pending', listener: (test: Test) => void): this;\n prependOnceListener(event: 'pending', listener: (test: Test) => void): this;\n emit(name: 'pending', test: Test): boolean;\n }\n // #endregion Runner \"pending\" event\n // #region Runner untyped events\n interface Runner extends NodeJS.EventEmitter {\n on(event: string, listener: (...args: any[]) => void): this;\n once(event: string, listener: (...args: any[]) => void): this;\n addListener(event: string, listener: (...args: any[]) => void): this;\n removeListener(event: string, listener: (...args: any[]) => void): this;\n prependListener(event: string, listener: (...args: any[]) => void): this;\n prependOnceListener(event: string, listener: (...args: any[]) => void): this;\n emit(name: string, ...args: any[]): boolean;\n }\n // #endregion Runner untyped events\n\n interface SuiteConstants {\n readonly EVENT_FILE_POST_REQUIRE: 'post-require';\n readonly EVENT_FILE_PRE_REQUIRE: 'pre-require';\n readonly EVENT_FILE_REQUIRE: 'require';\n readonly EVENT_ROOT_SUITE_RUN: 'run';\n\n readonly HOOK_TYPE_AFTER_ALL: 'afterAll';\n readonly HOOK_TYPE_AFTER_EACH: 'afterEach';\n readonly HOOK_TYPE_BEFORE_ALL: 'beforeAll';\n readonly HOOK_TYPE_BEFORE_EACH: 'beforeEach';\n\n readonly EVENT_SUITE_ADD_HOOK_AFTER_ALL: 'afterAll';\n readonly EVENT_SUITE_ADD_HOOK_AFTER_EACH: 'afterEach';\n readonly EVENT_SUITE_ADD_HOOK_BEFORE_ALL: 'beforeAll';\n readonly EVENT_SUITE_ADD_HOOK_BEFORE_EACH: 'beforeEach';\n readonly EVENT_SUITE_ADD_SUITE: 'suite';\n readonly EVENT_SUITE_ADD_TEST: 'test';\n }\n\n /**\n * Initialize a new `Suite` with the given `title` and `ctx`.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html\n */\n class Suite {\n private _beforeEach;\n private _beforeAll;\n private _afterEach;\n private _afterAll;\n private _timeout;\n private _slow;\n private _bail;\n private _retries;\n private _onlyTests;\n private _onlySuites;\n\n static readonly constants: SuiteConstants;\n\n constructor(title: string, parentContext?: Context);\n\n ctx: Context;\n suites: Suite[];\n tests: Test[];\n pending: boolean;\n file?: string | undefined;\n root: boolean;\n delayed: boolean;\n parent: Suite | undefined;\n title: string;\n\n /**\n * Create a new `Suite` with the given `title` and parent `Suite`. When a suite\n * with the same title is already present, that suite is returned to provide\n * nicer reporter and more flexible meta-testing.\n *\n * @see https://mochajs.org/api/mocha#.exports.create\n */\n static create(parent: Suite, title: string): Suite;\n\n /**\n * Return a clone of this `Suite`.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#clone\n */\n clone(): Suite;\n\n /**\n * Get timeout `ms`.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#timeout\n */\n timeout(): number;\n\n /**\n * Set timeout `ms` or short-hand such as \"2s\".\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#timeout\n */\n timeout(ms: string | number): this;\n\n /**\n * Get number of times to retry a failed test.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#retries\n */\n retries(): number;\n\n /**\n * Set number of times to retry a failed test.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#retries\n */\n retries(n: string | number): this;\n\n /**\n * Get slow `ms`.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#slow\n */\n slow(): number;\n\n /**\n * Set slow `ms` or short-hand such as \"2s\".\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#slow\n */\n slow(ms: string | number): this;\n\n /**\n * Get whether to bail after first error.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#bail\n */\n bail(): boolean;\n\n /**\n * Set whether to bail after first error.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#bail\n */\n bail(bail: boolean): this;\n\n /**\n * Check if this suite or its parent suite is marked as pending.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#isPending\n */\n isPending(): boolean;\n\n /**\n * Run `fn(test[, done])` before running tests.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll\n */\n beforeAll(fn?: Func): this;\n\n /**\n * Run `fn(test[, done])` before running tests.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll\n */\n beforeAll(fn?: AsyncFunc): this;\n\n /**\n * Run `fn(test[, done])` before running tests.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll\n */\n beforeAll(title: string, fn?: Func): this;\n\n /**\n * Run `fn(test[, done])` before running tests.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#beforeAll\n */\n beforeAll(title: string, fn?: AsyncFunc): this;\n\n /**\n * Run `fn(test[, done])` after running tests.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#afterAll\n */\n afterAll(fn?: Func): this;\n\n /**\n * Run `fn(test[, done])` after running tests.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#afterAll\n */\n afterAll(fn?: AsyncFunc): this;\n\n /**\n * Run `fn(test[, done])` after running tests.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#afterAll\n */\n afterAll(title: string, fn?: Func): this;\n\n /**\n * Run `fn(test[, done])` after running tests.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#afterAll\n */\n afterAll(title: string, fn?: AsyncFunc): this;\n\n /**\n * Run `fn(test[, done])` before each test case.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach\n */\n beforeEach(fn?: Func): this;\n\n /**\n * Run `fn(test[, done])` before each test case.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach\n */\n beforeEach(fn?: AsyncFunc): this;\n\n /**\n * Run `fn(test[, done])` before each test case.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach\n */\n beforeEach(title: string, fn?: Func): this;\n\n /**\n * Run `fn(test[, done])` before each test case.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#beforeEach\n */\n beforeEach(title: string, fn?: AsyncFunc): this;\n\n /**\n * Run `fn(test[, done])` after each test case.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#afterEach\n */\n afterEach(fn?: Func): this;\n\n /**\n * Run `fn(test[, done])` after each test case.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#afterEach\n */\n afterEach(fn?: AsyncFunc): this;\n\n /**\n * Run `fn(test[, done])` after each test case.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#afterEach\n */\n afterEach(title: string, fn?: Func): this;\n\n /**\n * Run `fn(test[, done])` after each test case.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#afterEach\n */\n afterEach(title: string, fn?: AsyncFunc): this;\n\n /**\n * Add a test `suite`.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#addSuite\n */\n addSuite(suite: Suite): this;\n\n /**\n * Add a `test` to this suite.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#addTest\n */\n addTest(test: Test): this;\n\n /**\n * Cleans all references from this suite and all child suites.\n *\n * https://mochajs.org/api/suite#dispose\n */\n dispose(): void;\n\n /**\n * Return the full title generated by recursively concatenating the parent's\n * full title.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#.Suite#fullTitle\n */\n fullTitle(): string;\n\n /**\n * Return the title path generated by recursively concatenating the parent's\n * title path.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#.Suite#titlePath\n */\n titlePath(): string[];\n\n /**\n * Return the total number of tests.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#.Suite#total\n */\n total(): number;\n\n /**\n * Iterates through each suite recursively to find all tests. Applies a\n * function in the format `fn(test)`.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#eachTest\n */\n eachTest(fn: (test: Test) => void): this;\n\n /**\n * This will run the root suite if we happen to be running in delayed mode.\n *\n * @see https://mochajs.org/api/Mocha.Suite.html#run\n */\n run(): void;\n\n /**\n * Generic hook-creator.\n */\n protected _createHook(title: string, fn?: Func | AsyncFunc): Hook;\n }\n\n // #region Suite \"beforeAll\" event\n interface Suite extends NodeJS.EventEmitter {\n on(event: 'beforeAll', listener: (hook: Hook) => void): this;\n once(event: 'beforeAll', listener: (hook: Hook) => void): this;\n addListener(event: 'beforeAll', listener: (hook: Hook) => void): this;\n removeListener(event: 'beforeAll', listener: (hook: Hook) => void): this;\n prependListener(event: 'beforeAll', listener: (hook: Hook) => void): this;\n prependOnceListener(event: 'beforeAll', listener: (hook: Hook) => void): this;\n emit(name: 'beforeAll', hook: Hook): boolean;\n }\n // #endregion Suite \"beforeAll\" event\n // #region Suite \"afterAll\" event\n interface Suite extends NodeJS.EventEmitter {\n on(event: 'afterAll', listener: (hook: Hook) => void): this;\n once(event: 'afterAll', listener: (hook: Hook) => void): this;\n addListener(event: 'afterAll', listener: (hook: Hook) => void): this;\n removeListener(event: 'afterAll', listener: (hook: Hook) => void): this;\n prependListener(event: 'afterAll', listener: (hook: Hook) => void): this;\n prependOnceListener(event: 'afterAll', listener: (hook: Hook) => void): this;\n emit(name: 'afterAll', hook: Hook): boolean;\n }\n // #endregion Suite \"afterAll\" event\n // #region Suite \"beforeEach\" event\n interface Suite extends NodeJS.EventEmitter {\n on(event: 'beforeEach', listener: (hook: Hook) => void): this;\n once(event: 'beforeEach', listener: (hook: Hook) => void): this;\n addListener(event: 'beforeEach', listener: (hook: Hook) => void): this;\n removeListener(event: 'beforeEach', listener: (hook: Hook) => void): this;\n prependListener(event: 'beforeEach', listener: (hook: Hook) => void): this;\n prependOnceListener(event: 'beforeEach', listener: (hook: Hook) => void): this;\n emit(name: 'beforeEach', hook: Hook): boolean;\n }\n // #endregion Suite \"beforeEach\" event\n // #region Suite \"afterEach\" event\n interface Suite extends NodeJS.EventEmitter {\n on(event: 'afterEach', listener: (hook: Hook) => void): this;\n once(event: 'afterEach', listener: (hook: Hook) => void): this;\n addListener(event: 'afterEach', listener: (hook: Hook) => void): this;\n removeListener(event: 'afterEach', listener: (hook: Hook) => void): this;\n prependListener(event: 'afterEach', listener: (hook: Hook) => void): this;\n prependOnceListener(event: 'afterEach', listener: (hook: Hook) => void): this;\n emit(name: 'afterEach', hook: Hook): boolean;\n }\n // #endregion Suite \"afterEach\" event\n // #region Suite \"suite\" event\n interface Suite extends NodeJS.EventEmitter {\n on(event: 'suite', listener: (suite: Suite) => void): this;\n once(event: 'suite', listener: (suite: Suite) => void): this;\n addListener(event: 'suite', listener: (suite: Suite) => void): this;\n removeListener(event: 'suite', listener: (suite: Suite) => void): this;\n prependListener(event: 'suite', listener: (suite: Suite) => void): this;\n prependOnceListener(event: 'suite', listener: (suite: Suite) => void): this;\n emit(name: 'suite', suite: Suite): boolean;\n }\n // #endregion Suite \"suite\" event\n // #region Suite \"test\" event\n interface Suite {\n on(event: 'test', listener: (test: Test) => void): this;\n once(event: 'test', listener: (test: Test) => void): this;\n addListener(event: 'test', listener: (test: Test) => void): this;\n removeListener(event: 'test', listener: (test: Test) => void): this;\n prependListener(event: 'test', listener: (test: Test) => void): this;\n prependOnceListener(event: 'test', listener: (test: Test) => void): this;\n emit(name: 'test', test: Test): boolean;\n }\n // #endregion Suite \"test\" event\n // #region Suite \"run\" event\n interface Suite extends NodeJS.EventEmitter {\n on(event: 'run', listener: () => void): this;\n once(event: 'run', listener: () => void): this;\n addListener(event: 'run', listener: () => void): this;\n removeListener(event: 'run', listener: () => void): this;\n prependListener(event: 'run', listener: () => void): this;\n prependOnceListener(event: 'run', listener: () => void): this;\n emit(name: 'run'): boolean;\n }\n // #endregion Suite \"run\" event\n // #region Suite \"pre-require\" event\n interface Suite extends NodeJS.EventEmitter {\n on(event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this;\n once(event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this;\n addListener(event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this;\n removeListener(\n event: 'pre-require',\n listener: (context: MochaGlobals, file: string, mocha: Mocha) => void,\n ): this;\n prependListener(\n event: 'pre-require',\n listener: (context: MochaGlobals, file: string, mocha: Mocha) => void,\n ): this;\n prependOnceListener(\n event: 'pre-require',\n listener: (context: MochaGlobals, file: string, mocha: Mocha) => void,\n ): this;\n emit(name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha): boolean;\n }\n // #endregion Suite \"pre-require\" event\n // #region Suite \"require\" event\n interface Suite extends NodeJS.EventEmitter {\n on(event: 'require', listener: (module: any, file: string, mocha: Mocha) => void): this;\n once(event: 'require', listener: (module: any, file: string, mocha: Mocha) => void): this;\n addListener(event: 'require', listener: (module: any, file: string, mocha: Mocha) => void): this;\n removeListener(event: 'require', listener: (module: any, file: string, mocha: Mocha) => void): this;\n prependListener(event: 'require', listener: (module: any, file: string, mocha: Mocha) => void): this;\n prependOnceListener(event: 'require', listener: (module: any, file: string, mocha: Mocha) => void): this;\n emit(name: 'require', module: any, file: string, mocha: Mocha): boolean;\n }\n // #endregion Suite \"require\" event\n // #region Suite \"post-require\" event\n interface Suite extends NodeJS.EventEmitter {\n on(event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this;\n once(event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this;\n addListener(event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void): this;\n removeListener(\n event: 'post-require',\n listener: (context: MochaGlobals, file: string, mocha: Mocha) => void,\n ): this;\n prependListener(\n event: 'post-require',\n listener: (context: MochaGlobals, file: string, mocha: Mocha) => void,\n ): this;\n prependOnceListener(\n event: 'post-require',\n listener: (context: MochaGlobals, file: string, mocha: Mocha) => void,\n ): this;\n emit(name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha): boolean;\n }\n // #endregion Suite \"post-require\" event\n // #region Suite untyped events\n interface Suite extends NodeJS.EventEmitter {\n on(event: string, listener: (...args: any[]) => void): this;\n once(event: string, listener: (...args: any[]) => void): this;\n addListener(event: string, listener: (...args: any[]) => void): this;\n removeListener(event: string, listener: (...args: any[]) => void): this;\n prependListener(event: string, listener: (...args: any[]) => void): this;\n prependOnceListener(event: string, listener: (...args: any[]) => void): this;\n emit(name: string, ...args: any[]): boolean;\n }\n // #endregion Runner untyped events\n\n /**\n * Initialize a new `Hook` with the given `title` and callback `fn`\n *\n * @see https://mochajs.org/api/Hook.html\n */\n class Hook extends Runnable {\n private _error;\n\n type: 'hook';\n originalTitle?: string | undefined; // added by Runner\n\n /**\n * Get the test `err`.\n *\n * @see https://mochajs.org/api/Hook.html#error\n */\n error(): any;\n\n /**\n * Set the test `err`.\n *\n * @see https://mochajs.org/api/Hook.html#error\n */\n error(err: any): void;\n }\n\n /**\n * An alternative way to define root hooks that works with parallel runs.\n *\n * Root hooks work with any interface, but the property names do not change.\n * In other words, if you are using the tdd interface, suiteSetup maps to beforeAll, and setup maps to beforeEach.\n *\n * As with other hooks, `this` refers to to the current context object.\n *\n * @see https://mochajs.org/#root-hook-plugins\n */\n interface RootHookObject {\n /**\n * In serial mode, run after all tests end, once only.\n * In parallel mode, run after all tests end, for each file.\n */\n afterAll?: Func | AsyncFunc | Func[] | AsyncFunc[] | undefined;\n /**\n * In serial mode (Mocha's default), before all tests begin, once only.\n * In parallel mode, run before all tests begin, for each file.\n */\n beforeAll?: Func | AsyncFunc | Func[] | AsyncFunc[] | undefined;\n /**\n * In both modes, run after every test.\n */\n afterEach?: Func | AsyncFunc | Func[] | AsyncFunc[] | undefined;\n /**\n * In both modes, run before each test.\n */\n beforeEach?: Func | AsyncFunc | Func[] | AsyncFunc[] | undefined;\n }\n\n /**\n * Initialize a new `Test` with the given `title` and callback `fn`.\n *\n * @see https://mochajs.org/api/Test.html\n */\n class Test extends Runnable {\n type: 'test';\n speed?: 'slow' | 'medium' | 'fast' | undefined; // added by reporters\n err?: Error | undefined; // added by reporters\n clone(): Test;\n }\n\n /**\n * Test statistics\n */\n interface Stats {\n suites: number;\n tests: number;\n passes: number;\n pending: number;\n failures: number;\n start?: Date | undefined;\n end?: Date | undefined;\n duration?: number | undefined;\n }\n\n type TestInterface = (suite: Suite) => void;\n\n interface ReporterConstructor {\n new (runner: Runner, options: MochaOptions): reporters.Base;\n }\n\n type Done = (err?: any) => void;\n\n /**\n * Callback function used for tests and hooks.\n */\n type Func = (this: Context, done: Done) => void;\n\n /**\n * Async callback function used for tests and hooks.\n */\n type AsyncFunc = (this: Context) => PromiseLike<any>;\n\n /**\n * Options to pass to Mocha.\n */\n interface MochaOptions {\n /** Propagate uncaught errors? */\n allowUncaught?: boolean | undefined;\n\n /** Force `done` callback or promise? */\n asyncOnly?: boolean | undefined;\n\n /** bail on the first test failure. */\n bail?: boolean | undefined;\n\n /** Check for global variable leaks? */\n checkLeaks?: boolean | undefined;\n\n /** Color TTY output from reporter */\n color?: boolean | undefined;\n\n /** Delay root suite execution? */\n delay?: boolean | undefined;\n\n /** Show diff on failure? */\n diff?: boolean | undefined;\n\n /** Report tests without running them? */\n dryRun?: boolean | undefined;\n\n /** Test filter given string. */\n fgrep?: string | undefined;\n\n /** Tests marked `only` fail the suite? */\n forbidOnly?: boolean | undefined;\n\n /** Pending tests fail the suite? */\n forbidPending?: boolean | undefined;\n\n /** Full stacktrace upon failure? */\n fullTrace?: boolean | undefined;\n\n /** Variables expected in global scope. */\n globals?: string[] | undefined;\n\n /** Test filter given regular expression. */\n grep?: string | RegExp | undefined;\n\n /** Enable desktop notifications? */\n growl?: boolean | undefined;\n\n /** Display inline diffs? */\n inlineDiffs?: boolean | undefined;\n\n /** Invert test filter matches? */\n invert?: boolean | undefined;\n\n /** Disable syntax highlighting? */\n noHighlighting?: boolean | undefined;\n\n /** Reporter name or constructor. */\n reporter?: string | ReporterConstructor | undefined;\n\n /** Reporter settings object. */\n reporterOptions?: any;\n\n /** Number of times to retry failed tests. */\n retries?: number | undefined;\n\n /** Slow threshold value. */\n slow?: number | undefined;\n\n /** Timeout threshold value. */\n timeout?: number | string | undefined;\n\n /** Interface name. */\n ui?: Interface | undefined;\n\n /** Run jobs in parallel */\n parallel?: boolean | undefined;\n\n /** Max number of worker processes for parallel runs. */\n jobs?: number | undefined;\n\n /** Hooks to bootstrap the root suite with. */\n rootHooks?: RootHookObject | undefined;\n\n /** Pathname of `rootHooks` plugin for parallel runs. */\n require?: string[] | undefined;\n\n /** Should be `true` if `Mocha` process is running in a worker process. */\n isWorker?: boolean | undefined;\n }\n\n interface MochaInstanceOptions extends MochaOptions {\n files?: string[] | undefined;\n }\n\n /**\n * Variables added to the global scope by Mocha when run in the CLI.\n */\n interface MochaGlobals {\n /**\n * Execute before running tests.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#before\n */\n before: HookFunction;\n\n /**\n * Execute after running tests.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#after\n */\n after: HookFunction;\n\n /**\n * Execute before each test case.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#beforeEach\n */\n beforeEach: HookFunction;\n\n /**\n * Execute after each test case.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#afterEach\n */\n afterEach: HookFunction;\n\n /**\n * Describe a \"suite\" containing nested suites and tests.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n describe: SuiteFunction;\n\n /**\n * Describe a \"suite\" containing nested suites and tests.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n context: SuiteFunction;\n\n /**\n * Pending suite.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n xdescribe: PendingSuiteFunction;\n\n /**\n * Pending suite.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n xcontext: PendingSuiteFunction;\n\n /**\n * Describes a test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n it: TestFunction;\n\n /**\n * Describes a test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n specify: TestFunction;\n\n /**\n * Describes a pending test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n xit: PendingTestFunction;\n\n /**\n * Describes a pending test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n xspecify: PendingTestFunction;\n\n /**\n * Execute before running tests.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#before\n */\n suiteSetup: HookFunction;\n\n /**\n * Execute after running tests.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#after\n */\n suiteTeardown: HookFunction;\n\n /**\n * Execute before each test case.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#beforeEach\n */\n setup: HookFunction;\n\n /**\n * Execute after each test case.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#afterEach\n */\n teardown: HookFunction;\n\n /**\n * Describe a \"suite\" containing nested suites and tests.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n suite: SuiteFunction;\n\n /**\n * Describes a test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\n test: TestFunction;\n\n run: typeof run;\n }\n\n /**\n * Third-party declarations that want to add new entries to the `Reporter` union can\n * contribute names here.\n */\n interface ReporterContributions {\n Base: never;\n base: never;\n Dot: never;\n dot: never;\n TAP: never;\n tap: never;\n JSON: never;\n json: never;\n HTML: never;\n html: never;\n List: never;\n list: never;\n Min: never;\n min: never;\n Spec: never;\n spec: never;\n Nyan: never;\n nyan: never;\n XUnit: never;\n xunit: never;\n Markdown: never;\n markdown: never;\n Progress: never;\n progress: never;\n Landing: never;\n landing: never;\n JSONStream: never;\n 'json-stream': never;\n }\n\n type Reporter = keyof ReporterContributions;\n\n /**\n * Third-party declarations that want to add new entries to the `Interface` union can\n * contribute names here.\n */\n interface InterfaceContributions {\n bdd: never;\n tdd: never;\n qunit: never;\n exports: never;\n }\n\n type Interface = keyof InterfaceContributions;\n}\n\n// #region Test interface augmentations\n\n/**\n * Triggers root suite execution.\n *\n * - _Only available if flag --delay is passed into Mocha._\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#runWithSuite\n */\ndeclare function run(): void;\n\n/**\n * Execute before running tests.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#before\n */\ndeclare var before: Mocha.HookFunction;\n\n/**\n * Execute before running tests.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#before\n */\ndeclare var suiteSetup: Mocha.HookFunction;\n\n/**\n * Execute after running tests.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#after\n */\ndeclare var after: Mocha.HookFunction;\n\n/**\n * Execute after running tests.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#after\n */\ndeclare var suiteTeardown: Mocha.HookFunction;\n\n/**\n * Execute before each test case.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#beforeEach\n */\ndeclare var beforeEach: Mocha.HookFunction;\n\n/**\n * Execute before each test case.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#beforeEach\n */\ndeclare var setup: Mocha.HookFunction;\n\n/**\n * Execute after each test case.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#afterEach\n */\ndeclare var afterEach: Mocha.HookFunction;\n\n/**\n * Execute after each test case.\n *\n * - _Only available when invoked via the mocha CLI._\n *\n * @see https://mochajs.org/api/global.html#afterEach\n */\ndeclare var teardown: Mocha.HookFunction;\n\n/**\n * Describe a \"suite\" containing nested suites and tests.\n *\n * - _Only available when invoked via the mocha CLI._\n */\ndeclare var describe: Mocha.SuiteFunction;\n\n/**\n * Describe a \"suite\" containing nested suites and tests.\n *\n * - _Only available when invoked via the mocha CLI._\n */\ndeclare var context: Mocha.SuiteFunction;\n\n/**\n * Describe a \"suite\" containing nested suites and tests.\n *\n * - _Only available when invoked via the mocha CLI._\n */\ndeclare var suite: Mocha.SuiteFunction;\n\n/**\n * Pending suite.\n *\n * - _Only available when invoked via the mocha CLI._\n */\ndeclare var xdescribe: Mocha.PendingSuiteFunction;\n\n/**\n * Pending suite.\n *\n * - _Only available when invoked via the mocha CLI._\n */\ndeclare var xcontext: Mocha.PendingSuiteFunction;\n\n/**\n * Describes a test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\ndeclare var it: Mocha.TestFunction;\n\n/**\n * Describes a test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\ndeclare var specify: Mocha.TestFunction;\n\n/**\n * Describes a test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\ndeclare var test: Mocha.TestFunction;\n\n/**\n * Describes a pending test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\ndeclare var xit: Mocha.PendingTestFunction;\n\n/**\n * Describes a pending test case.\n *\n * - _Only available when invoked via the mocha CLI._\n */\ndeclare var xspecify: Mocha.PendingTestFunction;\n\n// #endregion Test interface augmentations\n\n// #region Reporter augmentations\n\n// Forward declaration for `HTMLLIElement` from lib.dom.d.ts.\n// Required by Mocha.reporters.HTML.\n// NOTE: Mocha *must not* have a direct dependency on DOM types.\n// tslint:disable-next-line no-empty-interface\ninterface HTMLLIElement {}\n\n// Augments the DOM `Window` object when lib.dom.d.ts is loaded.\n// tslint:disable-next-line no-empty-interface\ninterface Window extends Mocha.MochaGlobals {}\n\ndeclare namespace NodeJS {\n // Forward declaration for `NodeJS.EventEmitter` from node.d.ts.\n // Required by Mocha.Runnable, Mocha.Runner, and Mocha.Suite.\n // NOTE: Mocha *must not* have a direct dependency on @types/node.\n // tslint:disable-next-line no-empty-interface\n interface EventEmitter {}\n\n // Augments NodeJS's `global` object when node.d.ts is loaded\n // tslint:disable-next-line no-empty-interface\n interface Global extends Mocha.MochaGlobals {}\n}\n\n// #endregion Reporter augmentations\n\n// #region Browser augmentations\n\n/**\n * Mocha global.\n *\n * - _Only supported in the browser._\n */\ndeclare const mocha: BrowserMocha;\n\ninterface BrowserMocha extends Mocha {\n /**\n * Function to allow assertion libraries to throw errors directly into mocha.\n * This is useful when running tests in a browser because window.onerror will\n * only receive the 'message' attribute of the Error.\n *\n * - _Only supported in the browser._\n */\n throwError(err: any): never;\n\n /**\n * Setup mocha with the given settings options.\n *\n * - _Only supported in the browser._\n */\n setup(opts?: Mocha.Interface | Mocha.MochaOptions): this;\n}\n\n// #endregion Browser augmentations\n\ndeclare module 'mocha' {\n export = Mocha;\n}\n\ndeclare module 'mocha/lib/stats-collector' {\n export = createStatsCollector;\n\n /**\n * Provides stats such as test duration, number of tests passed / failed etc., by listening for events emitted by `runner`.\n */\n function createStatsCollector(runner: Mocha.Runner): void;\n}\n\ndeclare module 'mocha/lib/interfaces/common' {\n export = common;\n\n function common(suites: Mocha.Suite[], context: Mocha.MochaGlobals, mocha: Mocha): common.CommonFunctions;\n\n namespace common {\n interface CommonFunctions {\n /**\n * This is only present if flag --delay is passed into Mocha. It triggers\n * root suite execution.\n */\n runWithSuite(suite: Mocha.Suite): () => void;\n\n /**\n * Execute before running tests.\n */\n before(fn?: Mocha.Func | Mocha.AsyncFunc): void;\n\n /**\n * Execute before running tests.\n */\n before(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void;\n\n /**\n * Execute after running tests.\n */\n after(fn?: Mocha.Func | Mocha.AsyncFunc): void;\n\n /**\n * Execute after running tests.\n */\n after(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void;\n\n /**\n * Execute before each test case.\n */\n beforeEach(fn?: Mocha.Func | Mocha.AsyncFunc): void;\n\n /**\n * Execute before each test case.\n */\n beforeEach(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void;\n\n /**\n * Execute after each test case.\n */\n afterEach(fn?: Mocha.Func | Mocha.AsyncFunc): void;\n\n /**\n * Execute after each test case.\n */\n afterEach(name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void;\n\n suite: SuiteFunctions;\n test: TestFunctions;\n }\n\n interface CreateOptions {\n /** Title of suite */\n title: string;\n\n /** Suite function */\n fn?: ((this: Mocha.Suite) => void) | undefined;\n\n /** Is suite pending? */\n pending?: boolean | undefined;\n\n /** Filepath where this Suite resides */\n file?: string | undefined;\n\n /** Is suite exclusive? */\n isOnly?: boolean | undefined;\n }\n\n interface SuiteFunctions {\n /**\n * Create an exclusive Suite; convenience function\n */\n only(opts: CreateOptions): Mocha.Suite;\n\n /**\n * Create a Suite, but skip it; convenience function\n */\n skip(opts: CreateOptions): Mocha.Suite;\n\n /**\n * Creates a suite.\n */\n create(opts: CreateOptions): Mocha.Suite;\n }\n\n interface TestFunctions {\n /**\n * Exclusive test-case.\n */\n only(mocha: Mocha, test: Mocha.Test): Mocha.Test;\n\n /**\n * Pending test case.\n */\n skip(title: string): void;\n\n /**\n * Number of retry attempts\n */\n retries(n: number): void;\n }\n }\n}\n"}}]);
//# sourceMappingURL=3397.0.36.3.1697209639220.js.map