@wdio/mocha-framework
- Version 9.0.8
- Published
- 30.7 kB
- 6 dependencies
- MIT license
Install
npm i @wdio/mocha-framework
yarn add @wdio/mocha-framework
pnpm add @wdio/mocha-framework
Overview
A WebdriverIO plugin. Adapter for Mocha testing framework.
Index
Variables
Classes
Interfaces
Namespaces
Variables
variable adapterFactory
const adapterFactory: { init?: Function };
Classes
class MochaAdapter
class MochaAdapter {}
Mocha runner
constructor
constructor( _cid: string, _config: ParsedConfiguration, _specs: string[], _capabilities: WebdriverIO.Capabilities, _reporter: EventEmitter);
method emit
emit: (event: string, payload: any, err?: MochaError) => void;
method getSyncEventIdEnd
getSyncEventIdEnd: (type: EventTypes) => string;
method getSyncEventIdStart
getSyncEventIdStart: (type: EventTypes) => string;
method getUID
getUID: (message: FrameworkMessage) => string;
method hasTests
hasTests: () => boolean;
method init
init: () => Promise<this>;
method prepareMessage
prepareMessage: ( hookName: keyof Services.HookFunctions) => import('./types.js').FormattedMessage;
method run
run: () => Promise<unknown>;
method wrapHook
wrapHook: ( hookName: keyof Services.HookFunctions) => () => Promise<void | unknown[]>;
Hooks which are added as true Mocha hooks need to call done() to notify async
Interfaces
interface FormattedMessage
interface FormattedMessage {}
property body
body?: string;
property cid
cid?: string;
property context
context?: any;
property currentTest
currentTest?: string;
property duration
duration?: number;
property error
error?: MochaError;
property file
file?: string;
property fullTitle
fullTitle?: string;
property parent
parent?: string;
property passed
passed?: boolean;
property pending
pending?: boolean;
property specs
specs?: string[];
property title
title?: string;
property type
type: string;
property uid
uid?: string;
interface FrameworkMessage
interface FrameworkMessage {}
interface MochaError
interface MochaError {}
interface MochaOpts
interface MochaOpts {}
property allowUncaught
allowUncaught?: boolean;
Propagate uncaught errors?
property asyncOnly
asyncOnly?: boolean;
Force done callback or promise?
property bail
bail?: boolean;
Bail after first test failure?
property checkLeaks
checkLeaks?: boolean;
Check for global variable leaks?
property compilers
compilers?: string[];
Use the given module(s) to compile files. Compilers will be included before requires (WebdriverIO framework option).
property delay
delay?: boolean;
Delay root suite execution?
property fgrep
fgrep?: string;
Test filter given string.
property forbidOnly
forbidOnly?: boolean;
Tests marked only fail the suite?
property forbidPending
forbidPending?: boolean;
Pending tests fail the suite?
property fullTrace
fullTrace?: boolean;
Full stacktrace upon failure?
property global
global?: string[];
Variables expected in global scope.
property grep
grep?: RegExp | string;
Test filter given regular expression.
property invert
invert?: boolean;
Invert test filter matches?
property require
require?: string[];
The
require
option is useful when you want to add or extend some basic functionality (WebdriverIO framework option).
property retries
retries?: number;
Number of times to retry failed tests.
property timeout
timeout?: number | string;
Timeout threshold value.
property ui
ui?: 'bdd' | 'tdd' | 'qunit' | 'exports';
Set test UI to one of the built-in test interfaces.
Namespaces
namespace global
namespace global {}
namespace global.WebdriverIO
namespace global.WebdriverIO {}
interface MochaOpts
interface MochaOpts extends MochaOptsImport {}
Package Files (2)
Dependencies (6)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@wdio/mocha-framework
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@wdio/mocha-framework)
- HTML<a href="https://www.jsdocs.io/package/@wdio/mocha-framework"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2833 ms. - Missing or incorrect documentation? Open an issue for this package.