{"name":"@wdio/mocha-framework","version":"5.4.14","keywords":["webdriver","wdio","wdio-reporter"],"author":{"name":"Christian Bromann","email":"christian@saucelabs.com"},"license":"MIT","_id":"@wdio/mocha-framework@5.4.14","maintainers":[{"name":"abjerstedt","email":"abjerstedt@gmail.com"},{"name":"christian-bromann","email":"christian@saucelabs.com"},{"name":"wdio-user","email":"christian+webdriverio@saucelabs.com"}],"homepage":"https://github.com/webdriverio/webdriverio/tree/master/packages/wdio-mocha-framework","bugs":{"url":"https://github.com/webdriverio/webdriverio/issues"},"dist":{"shasum":"8f9970583e1265a1284bfd287fba8014057eb36f","tarball":"http://registry-npm.ywwl.com/@wdio/mocha-framework/download/@wdio/mocha-framework-5.4.14.tgz","fileCount":6,"integrity":"sha512-Y/RbZw2U1EAEhAkTrLrTQUyMmQnkaXFgXH//M5yDNk2Gg2C/2uh8f0Nv7ibQ9N7p8C1ng6k1AFLsZQNWVujanA==","signatures":[{"sig":"MEQCIF0UdTQPHYb7rgHzx2mKnrviLgPGolYn5v/C/jWd3zeKAiATk6bkalTGKR1Z0TPlf6TGCpMVHhTB8cbugRh/QF+fEw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14724,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWcbCCRA9TVsSAnZWagAAIgoP/jLBHo/K4yD6a+AmQ5fp\nMqSPhMZyg1IQ3jdERkMVXerz57dryuyw50vfaVbtmC44P4+xUukm29ba+QhK\ne2TBuRVnFqmKktOGNbEif/uDAPTpDpkpIE6gVFVdiZc3zVzn2xnYnP03u6WS\nXpTW1fUx2wlGrHj9Ex0iG+6NMSytDBkZ2p98l2KFF0yrLikcBNa4hGeVUV+1\ncrfvJYi3X1vfJilGnP7G8Hg+MYG3yfp9TYh2XSKGLxJKMoM5bE6n/yOqiqGA\n58Q11GzbofhOnPXLID7sg38s4SpfoXmatjcN6wL2djReIoUSU56XDBkYklpU\nh7jE14jvW1X+YVdVGi41Dw3et2wlHOG4nvRlGsj+GHSXqSclv8ugM44+SC4O\ni1GwpO5E4bkXOTE13u3SQlgx2J5K8mVjyBiY9DL70c2VQ5GSPCRZen45DbvE\noNVHv4yKfYpJoNEL5dyW+cwpE0lG2g2fJ2hHc/k+XHU9Womsc9Q+R/vIkYO9\noRbm6WEXBVwutlcaoN0RQA2fqDt7irRtMhCG7Y2IZ6mCcxcdHaA/bBj7JLdh\n7gCbwYUG3WnT8ECwWiyLsSZKZrgjTkpKciG/lXi3D70K0mgcHnMa2u2Qdl7W\noNHcHPHFz2MoynzwFN4KnlCrbpTmk5ToE0LjcllwSpnef+yCE+J+paKIDZ8d\nAr+b\r\n=uoif\r\n-----END PGP SIGNATURE-----\r\n","size":5286,"noattachment":false,"key":"/@wdio/mocha-framework/-/@wdio/mocha-framework-5.4.14.tgz"},"main":"./build/index","types":"mocha-framework.d.ts","engines":{"node":">= 4.8.5"},"gitHead":"717300524ce31b9f39cecb47218015cf5af34d10","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.10.7/node@v10.14.2+x64 (darwin)","description":"A WebdriverIO plugin. Adapter for Mocha testing framework.","directories":{},"_nodeVersion":"10.14.2","dependencies":{"mocha":"^6.0.0-1","@types/mocha":"^5.2.5","@wdio/config":"^5.4.14","@wdio/logger":"^5.4.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"webdriverio":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mocha-framework_5.4.14_1549387457753_0.022655423065066627","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":1549387457893,"_cnpm_publish_time":1549387457893,"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"}}