首页

类

  • 钩子
    • 错误
    • 重置
  • Mocha
    • addFile
    • allowUncaught
    • asyncOnly
    • bail
    • checkLeaks
    • cleanReferencesAfterRun
    • color
    • delay
    • diff
    • dispose
    • dryRun
    • enableGlobalSetup
    • enableGlobalTeardown
    • failZero
    • fgrep
    • forbidOnly
    • forbidPending
    • fullTrace
    • global
    • globalSetup
    • globalTeardown
    • grep
    • hasGlobalSetupFixtures
    • hasGlobalTeardownFixtures
    • inlineDiffs
    • invert
    • lazyLoadFiles
    • loadFilesAsync
    • noHighlighting
    • parallelMode
    • reporter
    • retries
    • rootHooks
    • run
    • runGlobalSetup
    • runGlobalTeardown
    • slow
    • timeout
    • ui
    • unloadFiles
  • Base
    • exports.list
  • Doc
  • Dot
  • HTML
    • addCodeToggle
    • suiteURL
    • testURL
  • JSON
  • JSONStream
  • Landing
  • List
  • Markdown
  • Min
  • Nyan
  • Progress
  • Spec
  • TAP
  • XUnit
    • done
    • test
    • write
  • ParallelBuffered
    • createListener
    • createListeners
    • done
  • ParallelBufferedRunner
    • isParallelMode
    • linkPartialObjects
    • run
    • workerReporter
  • Runnable
    • 重置
  • Runner
    • abort
    • dispose
    • globals
    • grep
    • grepTotal
    • isParallelMode
    • linkPartialObjects
    • run
    • workerReporter
  • Suite
    • create
    • dispose
    • fullTitle
    • 重置
    • titlePath
    • total
  • Test
    • 重置

模块

  • Base
  • browser/Progress
    • Progress
  • 上下文
  • Doc
  • Dot
  • HTML
    • 错误
    • fragment
    • hideSuitesWithout
    • makeUrl
    • on
    • text
    • unhide
  • interfaces/common
    • after
    • afterEach
    • before
    • beforeEach
    • runWithSuite
  • JSON
  • JSONStream
  • Landing
  • lib/cli
    • loadOptions
    • loadPkgRc
    • loadRc
    • lookupFiles
    • main
  • lib/errors
    • createFatalError
    • createForbiddenExclusivityError
    • createInvalidArgumentTypeError
    • createInvalidArgumentValueError
    • createInvalidExceptionError
    • createInvalidInterfaceError
    • createInvalidLegacyPluginError
    • createInvalidPluginDefinitionError
    • createInvalidPluginError
    • createInvalidPluginImplementationError
    • createMissingArgumentError
    • createMochaInstanceAlreadyDisposedError
    • createMochaInstanceAlreadyRunningError
    • createMultipleDoneError
    • createNoFilesMatchPatternError
    • createTimeoutError
    • createUnparsableFileError
    • createUnsupportedError
    • isMochaError
    • createInvalidReporterError
  • lib/stats-collector
  • List
  • Markdown
  • Min
  • nodejs/reporters/parallel-buffered
  • Nyan
  • Pending
    • Pending
  • Progress
  • Spec
  • TAP
  • utils
    • clamp
    • clean
    • createMap
    • defineConstants
    • getMochaID
    • isPromise
    • noop
    • stackTraceFilter
    • uniqueID
  • XUnit
    • tag

外部

  • ConstructorParameters
  • EventEmitter
  • Exclude
  • Extract
  • InstanceType
  • NonNullable
  • Omit
  • OmitThisParameter
  • Parameters
  • Partial
  • Pick
  • Readonly
  • Record
  • Required
  • ReturnType
  • ThisParameterType
  • ThisType
  • yargsParser

命名空间

  • constants

教程

  • 创建自定义报告器

接口

  • 参数

全局

Mocha 的 API 文档


恭喜!您找到了 Mocha 的 API 文档。这些文档适用于希望

  • 为 Mocha 创建扩展,或
  • 开发 Mocha 本身,或
  • 用 Mocha 做一些其他花哨的事情

否则,您可能需要 主文档。

其他链接

  • 主文档
  • 发布说明/历史记录/更改
  • 行为准则
  • Discord (在这里提问!)
  • 问题跟踪器

文档由 JSDoc 3.6.11 使用 @mocha/docdash 主题生成。