{"name":"@wdio/mocha-framework","version":"5.14.3","keywords":["webdriver","wdio","wdio-reporter"],"author":{"name":"Christian Bromann","email":"christian@saucelabs.com"},"license":"MIT","_id":"@wdio/mocha-framework@5.14.3","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":"c38e7ae2e712aea62ebe93aea0434e46817205a2","tarball":"http://registry-npm.ywwl.com/@wdio/mocha-framework/download/@wdio/mocha-framework-5.14.3.tgz","fileCount":6,"integrity":"sha512-8rmggaYT0ldEBvPg8JW7s46l1Giq/oWZOGV6ueP8mT7La71LBe07Zhi6klWBrBDGeZFF7J1fH3L1IbU0Zkg4Xw==","signatures":[{"sig":"MEUCIQCToEtES2WrqzZtBpkt5U0piENULMtx/wfot4wW9mk5eAIgdfLG01qkkw33K2svxnqBFqovyGatz9OdiT+9N0J9QNg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14721,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlE4mCRA9TVsSAnZWagAA1ucP/3fcnvGatzcA73KDNqdN\nXXB80bUeHkJ8HmSeFk6CbO7cIS4N6Ais5SVuBR53ySi7mpNGRzxn+xByxMZM\nGjdXDNUZWPWugn3Nkr7bna11SuuUOSmyqEgZMYXuC/6aFP3hpOJdKxIdsceB\nFdW5o7VDmg2mFvcElKc3f/mOwWPL5AGTJ7Jg3z4Y+zVkGSpQefSTRM5wvM5B\niJaXsc6FUVYWEgOMqt42gxrxYtvBOzbiaLiloWD5r5N6FZe2mSHmpoR8oi0y\nL9qDKuIN/oQgygLLHVVYwF+w0VSgS/gvdHzmd7dOTXLQaVrI49k+4+ePjQrI\nCIMpO0CnS6EVYDfydPQhXy7n6jwEOjO4Jp4uT7YqbuPuGamw0nIPu2eD/mBA\ncB5wF9lAubrHdFJzlaWfX364xjDBG7/mA7DFjkGaKlMLx9lSK7gwInPTjfTG\nxqgrS5xBwM0ZOTDLsReqlt8S74Jw//8J/fbSWO88C356G5zWp5cJj0YLq38B\nu22rxs6rjNMFuKuWY6N7xeutfKDk0MFv1ubn1x4WtFBDAs8Yf3aNY8NBsxaX\nj5ZXhFU5YOyW6p1BAgqyDSJWQIT3buYjTHbn4xR6/MKJ2kjlsfhFZ4yGBq21\nqxrpuq2jSidBYuZrHrC1/sMvfU42Gmogi94RRy/7xMER4bjPaZv7inWxsyB2\nw4zy\r\n=rZ3s\r\n-----END PGP SIGNATURE-----\r\n","size":5133,"noattachment":false,"key":"/@wdio/mocha-framework/-/@wdio/mocha-framework-5.14.3.tgz"},"main":"./build/index","types":"mocha-framework.d.ts","engines":{"node":">= 8.11.0"},"gitHead":"edce2a5ffcb3bbaf62ccebad4c482fe41f2a3077","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.16.4/node@v8.11.2+x64 (darwin)","description":"A WebdriverIO plugin. Adapter for Mocha testing framework.","directories":{},"_nodeVersion":"8.11.2","dependencies":{"mocha":"^6.1.0","@wdio/utils":"5.14.3","@wdio/logger":"5.13.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/mocha":"^5.2.5"},"peerDependencies":{"webdriverio":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mocha-framework_5.14.3_1570000422248_0.018789359403431183","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":1570000422419,"_cnpm_publish_time":1570000422419,"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"}}