{"name":"@wdio/mocha-framework","version":"5.7.8","keywords":["webdriver","wdio","wdio-reporter"],"author":{"name":"Christian Bromann","email":"christian@saucelabs.com"},"license":"MIT","_id":"@wdio/mocha-framework@5.7.8","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":"59b1cbf651a2bd950b27f807f280e70f9268c367","tarball":"http://registry-npm.ywwl.com/@wdio/mocha-framework/download/@wdio/mocha-framework-5.7.8.tgz","fileCount":6,"integrity":"sha512-LQ3WEiTNnDZcTtUSIu4kMtxep3AScCab1JhLMFQwetVeEb94KmNf629hhA7Tzp/apC6mhyZ2RfOTWpC7XbNezQ==","signatures":[{"sig":"MEQCIGdLa1ZGF/6niYO6nkMZNKj7VDl5KvwpKZHTsPcTud7vAiAYyEy5uGF1qjV2O8jS2Q6adSkZFsmApnwFPx8Mm3q2ng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnU37CRA9TVsSAnZWagAAN1IP/1rmsUtoG11pkSwklNvb\n35bfonfX+g+9ANb61SAR+X7T2Fs/XJYt+SVyA6DtXj29/tPnC7fvWxV7NkT/\naZ1RP9+8okaBb2UoZO8Zy/bi1IQ1DizwtnRmHORnbueb0uU/SeOTo0NdlYbe\n1QoEojxZadTUcu+nx4NwS3wfA0SuRxOM7Are2e2VMFSEaq78mWxgte+339FG\nIGx+134cHFfey1xZ9XP7vlP1Zrl6v0CvHaD1oKQdZjuMrqt7dtvRUE8Y+6cj\n3hfXa1cUKtf+gPg/P+nOV1vczqWGfPJMLQZ+bu7ykT7YqoH/CH6w9GFMeRK3\nFNXn7WQyS3WR9LBWzqu5iYyjapN0js3XnWWo9II9l5N465Sc7gdOjooViHu2\n5SUKRunXfIqTXqcZpAvfhBnVmz7C4JJ0pj52nO5Z4wq4C1Cwbnl/4LFhH9fr\no6Azory0GvD2THrRTNQRmeiopeh+Y8xREwtmmH0L8KKMu1JcnqBG5Ce1nKoX\n7m3+kVSCFpmioTq+CNaRrL/vFjyXVR4XDhr8gntA5ZG47GznJtCvJ6VzzKvD\ngZYXTvx6wLRb2DbJ1bQv+nFU8CnoSATIw4Pvlgg1tcaKKAvKwYnd9e+SCtPC\naacqkKxx9HB8dP8iiIwOY5bUr36yXBqFCqQpensq73TuSSm1/tiMR2XUGv9D\ny2vh\r\n=z1yr\r\n-----END PGP SIGNATURE-----\r\n","size":5232,"noattachment":false,"key":"/@wdio/mocha-framework/-/@wdio/mocha-framework-5.7.8.tgz"},"main":"./build/index","types":"mocha-framework.d.ts","engines":{"node":">= 8.11.0"},"gitHead":"d96a4a8a313b7fd855f102af6198c60cf8475b8e","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.1/node@v10.1.0+x64 (darwin)","description":"A WebdriverIO plugin. Adapter for Mocha testing framework.","directories":{},"_nodeVersion":"10.1.0","dependencies":{"mocha":"^6.0.0-1","@types/mocha":"^5.2.5","@wdio/config":"^5.7.8","@wdio/logger":"^5.7.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"webdriverio":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mocha-framework_5.7.8_1553812986117_0.6765679998406648","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":1553812986232,"_cnpm_publish_time":1553812986232,"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"}}