{"name":"@wdio/mocha-framework","version":"5.4.18","keywords":["webdriver","wdio","wdio-reporter"],"author":{"name":"Christian Bromann","email":"christian@saucelabs.com"},"license":"MIT","_id":"@wdio/mocha-framework@5.4.18","maintainers":[{"name":"abjerstedt","email":"abjerstedt@gmail.com"},{"name":"christian-bromann","email":"christian@saucelabs.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":"3a208371766a710e55769caf5edbb1e0ba01c488","tarball":"http://registry-npm.ywwl.com/@wdio/mocha-framework/download/@wdio/mocha-framework-5.4.18.tgz","fileCount":6,"integrity":"sha512-sPHOqHu0IKo45zaON8Zzdw9c76lHiBqjBlI7xdP5TqD1GVo0GQihSOoFwKH2IKnV7poEEx3hdsgCt7WmHrjEAA==","signatures":[{"sig":"MEUCIQCnSY1IVjpk0s2kr9fou2Pa9yUrLPuad4hElDLy09E9XgIgHcsNj86LulbVPcXFlx4efKQMKdUlVKwiVFybxmh+U4I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcaveNCRA9TVsSAnZWagAAIFQP/1i8ZZ8Z0d5D9iMKBckl\niToA4Ok+iyUg3BNL9Mnt50htT8WSq0r//F4kkgIiGaAuDpB06/OdrjCEK12L\noNMhuu9uDUWwqa2FYyYXRtuTRvDVewyoj+OwjPkfU6wTQhwMB9hlUrz4e6He\nFfaJbw8pkSF9Hfa+wHNJmJbTOhtLmi4CAZcFsAHpz07L04gW9vCPI9ZgWvEm\nDKd+g6dXKzI+0sLuuen33IDyl1J3EVy1uyYsnDzNbxq2XGJi0sAEnDiviVCA\nBGWwQSokB2RoLEo0iEalWlsa16SUe9jrSuBn6p3/rXUU1ql8fhCF8NBTPBD/\nHYqlEReNa2/D53EVGBINn36yCiU2H3qu3cSGUTm3xciq7GzdkQ8fEuJP2g+4\nB1ovue+jxwmtEzFYWyH+Xb2H3DAVRXfumVl7/Ni0CB4BGhmQrjREYFdU1Swi\nYx8CdY/fnWbzI5akG3LSt1SLxu2aJC8pw26V7D4ujFngLCEwbtI8JB0wZPYv\nD7iD7nJ+e8PQIiuFHzcFT55C3U9DlrgaZuXrInITnPMAKR507KN4dHY8MU2Y\nc7LsR3K91nAbo/sHBbQ27V9pwqjspVvqL61lXKUhWyLUvW94AoPEnUX49sIE\nUtVFUhm18MQ5KMOK4dD9AK8XmxnaD5V48FrhUUIP+yu7waxJ/x35yL/9n5pb\nCWjm\r\n=zXF8\r\n-----END PGP SIGNATURE-----\r\n","size":5233,"noattachment":false,"key":"/@wdio/mocha-framework/-/@wdio/mocha-framework-5.4.18.tgz"},"main":"./build/index","types":"mocha-framework.d.ts","engines":{"node":">= 4.8.5"},"gitHead":"2df8e3b66fbbc21dd78a0de1bb7cfcb97131050f","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.13.0/node@v8.11.2+x64 (darwin)","description":"A WebdriverIO plugin. Adapter for Mocha testing framework.","directories":{},"_nodeVersion":"8.11.2","dependencies":{"mocha":"^6.0.0-1","@types/mocha":"^5.2.5","@wdio/config":"^5.4.18","@wdio/logger":"^5.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"webdriverio":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mocha-framework_5.4.18_1550514060889_0.42460481435038844","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":1550514060973,"_cnpm_publish_time":1550514060973,"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"}}