{"name":"@wdio/mocha-framework","version":"6.1.8","keywords":["webdriver","wdio","wdio-reporter"],"author":{"name":"Christian Bromann","email":"christian@saucelabs.com"},"license":"MIT","_id":"@wdio/mocha-framework@6.1.8","maintainers":[{"name":"abjerstedt","email":"abjerstedt@gmail.com"},{"name":"christian-bromann","email":"christian@saucelabs.com"},{"name":"erwinheitzman","email":"erwin.heitzman.npm@gmail.com"},{"name":"klamping","email":"me@klamp.in"},{"name":"mgrybyk","email":"mykola.grybyk@gmail.com"},{"name":"wdio-user","email":"christian+webdriverio@saucelabs.com"},{"name":"willbrock","email":"wpbrock@gmail.com"}],"homepage":"https://github.com/webdriverio/webdriverio/tree/master/packages/wdio-mocha-framework","bugs":{"url":"https://github.com/webdriverio/webdriverio/issues"},"dist":{"shasum":"d7364447c65e94754abed511c4f60f875feabd4e","tarball":"http://registry-npm.ywwl.com/@wdio/mocha-framework/download/@wdio/mocha-framework-6.1.8.tgz","fileCount":6,"integrity":"sha512-qxetJAYIK8aoL6qHGfVM2OrR0XNnFcI0iy6qUwDhcbKpGsk/fyR+l+8xT75LonW93hLSXDI83PBGkfyQVnMgbQ==","signatures":[{"sig":"MEYCIQD+jtVRRRFHkb6GVIa7mNmeflyFxdrfNMLCEZb6h7R9FQIhAKDKbtOA9lTy/Frp2CJP/v1hck4BXU17Hi9DbDXpblq0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17044,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesfFVCRA9TVsSAnZWagAAmRQP/1K2vSEXx0sT1f0DhUkw\nELhbJ6bwDe2lSqZkRDea6tpSrt3MGoAdoF7Y+3r6MSeHr928IwIo+96YD6ck\nfa/aoxaSx1nhaLQF4gOx9w6LltK8xK5tc7aj9DYI6XmciV4aQ9uxZbIUOjLI\noqqqiVhkj1W6d0XFa9ujuGpR4+mHJEqQz80sWpeWFS2kv0paLitVl1+arhlj\nMbuDNy9e9JEZLdzt0q55DuOG9YTcdWKg3prf+GVPqqNon5a4L3wg/f1sSZKw\nntzhyEFr2wJtrWyhScbEYNBwN++ak2IBDEoP7Qf46alQCTAPCjQSOjvqXQUE\ns6o6YQ/TO/KHGyVctZJR7c1cE4lEg4zALQJHY8nvkQvAxuCZXQEdW00FOlMT\nkXi9ebHPc1gKmlMedyNYyhZ1cIXPPRdPHk40FPl4qdq+U4QuNZu1oakU1zye\nwaPuyXwpaurMsEJbLYrqgkwZAB5hWru1zhdN/O1mUCQT0hhhPP1WHej5skak\n2u4lxee8VP4e0f6ptR5+02aCNCEDL/RxZjhoitdhLsH65O108v21huoH019t\nC5ItmTc7SZglwKBFt3ZxYHBkP+WVzLQ3OBgbnVAbGiULAaQFgSS/95ut/Msr\nXtIhxncV7/ZZKNeUFa1PUghK0sK+45Z5IlEmVP+N+Bm0liS9e01MQoVVj8W5\n/6EI\r\n=Yb/P\r\n-----END PGP SIGNATURE-----\r\n","size":5793,"noattachment":false,"key":"/@wdio/mocha-framework/-/@wdio/mocha-framework-6.1.8.tgz"},"main":"./build/index","types":"mocha-framework.d.ts","engines":{"node":">=10.0.0"},"gitHead":"2f7008522802d2b15705fb300aa93c544e0af405","scripts":{"test":"run-s test:*","build":"run-s clean compile","clean":"rimraf ./build","compile":"babel src/ -d build/ --config-file ../../babel.config.js","test:unit":"jest","test:eslint":"eslint src test"},"_npmUser":{"name":"christian-bromann","email":"christian@saucelabs.com"},"repository":{"url":"git://github.com/webdriverio/webdriverio.git","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"A WebdriverIO plugin. Adapter for Mocha testing framework.","directories":{},"_nodeVersion":"10.16.3","dependencies":{"mocha":"^7.0.1","@wdio/utils":"6.1.8","@wdio/logger":"6.0.16","expect-webdriverio":"^1.1.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/mocha":"^7.0.0"},"peerDependencies":{"webdriverio":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/mocha-framework_6.1.8_1588719957359_0.5835204616922143","host":"s3://npm-registry-packages"},"readme":"WDIO Mocha Framework Adapter\n============================\n\n> A WebdriverIO plugin. Adapter for Mocha testing framework.\n\n## Installation\n\nThe easiest way is to keep `@wdio/mocha-framework` as a devDependency in your `package.json`, via:\n\n```sh\nnpm install @wdio/mocha-framework --save-dev\n```\n\nInstructions on how to install `WebdriverIO` can be found [here.](https://webdriver.io/docs/gettingstarted)\n\n## Configuration\n\nFollowing code shows the default wdio test runner configuration...\n\n```js\n// wdio.conf.js\nmodule.exports = {\n  // ...\n  framework: 'mocha',\n\n  mochaOpts: {\n    ui: 'bdd'\n  }\n  // ...\n};\n```\n\nNote that interfaces supported are `bdd`, `tdd` and `qunit`. If you want to provide a custom interface, it should expose methods compatible with them and be named ending with `-bdd`, `-tdd` or `-qunit` accordingly.\n\n## `mochaOpts` Options\n\nOptions will be passed to the Mocha instance. See the list of supported Mocha options [here](https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options).\n\n`failHookAffectedTests` defaults to `true`. When a `before` or `beforeEach` hook fails, the tests that hook skipped are reported as failed. Set `failHookAffectedTests: false` to report only the hook.\n\n----\n\n## `mochaOpts.require (string|string[])`\n\nThe `require` option is useful when you want to add or extend some basic functionality. <br />\nFor example, let's try to create an anonymous `describe`:\n\n**wdio.conf.js**\n\n```js\n{\n  suites: {\n    login: ['tests/login/*.js']\n  },\n\n  mochaOpts: {\n    require: './hooks/mocha.js'\n  }\n}\n```\n\n**./hooks/mocha.js**\n\n```js\nimport path from 'path';\n\nlet { context, file, mocha, options } = module.parent.context;\nlet { describe } = context;\n\ncontext.describe = function (name, callback) {\n\tif (callback) {\n\t\treturn describe(...arguments);\n\t} else {\n\t\tcallback = name;\n\t\tname = path.basename(file, '.js');\n\n\t\treturn describe(name, callback);\n\t}\n}\n```\n\n**./tests/TEST-XXX.js**\n\n```js\ndescribe(() => {\n\tit('Login form', function () => {\n\t\tthis.skip();\n\t});\n});\n```\n\n**Output**\n\n```\nTEST-XXX\n   ✓ Login form\n```\n\nFor more information on WebdriverIO see the [homepage](https://webdriver.io).\n","publish_time":1588719957470,"_cnpm_publish_time":1588719957470,"dist-tags":{"beta":"7.0.0-beta.4","latest":"10.2.0","latest-5":"5.23.0","next":"10.2.0-alpha.100.sha-b38abd894","v7":"7.40.0","v8":"8.46.0","v9":"9.33.1"}}