{"name":"@wdio/mocha-framework","version":"5.2.3","keywords":["webdriver","wdio","wdio-reporter"],"author":"Christian Bromann <christian@saucelabs.com>","license":"MIT","_id":"@wdio/mocha-framework@5.2.3","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":"f8b5701ee957f4fff6451dbeb1b3ace8ac169638","tarball":"http://registry-npm.ywwl.com/@wdio/mocha-framework/download/@wdio/mocha-framework-5.2.3.tgz","fileCount":5,"integrity":"sha512-DhP0QLmrAufd/0ff55yXgqv3kN4CHLqDtEdDWptGeZrfCfzIcKdCfypTVDyKVrHeexqq8I4XWcdGn1bQ/lsiQA==","signatures":[{"sig":"MEUCIQDfbn28KO8uYxBBP/W44czx4xKp7SnWAa++bEeDTvnUzwIgcYW7pEUjNqrIDB75+J8NRJOlEHd0o+4pX8C6hCtHbaU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14199,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcMmLiCRA9TVsSAnZWagAA95kQAI6Ek8GeeR4mMUk4MIHL\nEZ2Nmh3FHV/J9jdqrzf6B5GP4ZJTQ34T8qtszx61iy4lgqklLwl76NY7sOLr\nydZr2gOnY3syOPI3SJkLsfMAeS8ZfXBf8xYhdWbGcZQDybC50TBlF7gEygNs\nxalJA6u6wU7Clt4/eY4yakc9QJnuUOgbvjMvjj5pjy5eQ+KE6VBX2p/QFBkl\nGM6+2vVwiFryWXbY17jBhrbix3IfRBIu7p1eRdo4plgVOyMKmKP+q3XehoGC\nQA9eFIXrxiunXbpyF56DkGR7R+xgEqAqjL5O44qUrcdJhoYbHdPme2ZgJY3W\nlsFq5XiZ2Gs19U2MR6s1xnzNJ9uqq5UttoHkmw/NDmf6lyqwUobKlIrLuTKf\nmAIOFuApjWkiqkN6y27oOsKVGIwfqeLHa+H1IYDHHI6W2UwkGaa+45fChLOD\n3JzNyPf96XaKoYx4B8UHI3PK8KDniILIpc19J9emPXYVD0c1I/ZZA6fS6Zuq\nRUNXSFtiL38vhk1edsN2aETMOxwBiE77UOzYB/eQbDfP1mvIKTkWc2IK/T19\nmTc7OQtMOVxpIJaeweoukIV7BqwB1fXcN7wV5UV+V3lMMCZfS8YpDr63VSfs\nYiHKSIgVbuOYukgU0uo3pD8Q7I4gzLw8R/c/D/yaPQiKutdxX25EvtqZyqeP\n4RNF\r\n=v1o3\r\n-----END PGP SIGNATURE-----\r\n","size":5076,"noattachment":false,"key":"/@wdio/mocha-framework/-/@wdio/mocha-framework-5.2.3.tgz"},"main":"./build/index","engines":{"node":">= 4.8.5"},"gitHead":"fc84d8fc6889043bfc0c85994acb7b4d5445ba1d","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.8.0/node@v8.11.2+x64 (darwin)","description":"A WebdriverIO plugin. Adapter for Mocha testing framework.","directories":{},"_nodeVersion":"8.11.2","dependencies":{"mocha":"^5.2.0","@wdio/config":"^5.2.3","@wdio/logger":"^5.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"webdriverio":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mocha-framework_5.2.3_1546805986153_0.04552057296300327","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":1546805986245,"_cnpm_publish_time":1546805986245,"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"}}