{"name":"@wdio/mocha-framework","version":"8.0.0-alpha.537","keywords":["webdriver","wdio","wdio-reporter"],"author":{"name":"Christian Bromann","email":"mail@bromann.dev"},"license":"MIT","_id":"@wdio/mocha-framework@8.0.0-alpha.537","maintainers":[{"name":"christian-bromann","email":"christian@saucelabs.com"},{"name":"wdio-user","email":"christian+webdriverio@saucelabs.com"},{"name":"wswebcreation-nl","email":"wim@wswebcreation.nl"}],"homepage":"https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-mocha-framework","bugs":{"url":"https://github.com/webdriverio/webdriverio/issues"},"dist":{"shasum":"d73332c80b5715710ad796825d48f2427b635b25","tarball":"http://registry-npm.ywwl.com/@wdio/mocha-framework/download/@wdio/mocha-framework-8.0.0-alpha.537.tgz","fileCount":18,"integrity":"sha512-6bvU/ZKTiDmqeKPO4dcUcFY3uCazIc9wePI1Dyu+XQVTsrhBCVwbjIFwaNPfvmh6DWI00+DtnjY2bsi3Lmantg==","signatures":[{"sig":"MEQCIGxOXnGLRV3OCPT0V6FCVSAkGEy6LdbPawygp4mSAL1IAiAzVmjUO1QS6eAwtJ0D7OM36aEroIuuXhSPNXN/3f2pfw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbgTkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpbtA/8DSEkHk52fARwItQ+yDgynjydXPZ4KnBLakG6E3zr9RCAaIQj\r\n8xRrPBnkc5oBY1PkoUQQB4zsYSCkICi914nB/uuzoOxmpVJMznLgwFbOpRzB\r\nwW2WqqVlH/QZi2AVee9WIq7Tr1t6RWcqhpWWebukImlx/U1cUzQjhY7O7vIj\r\nWq38PY/lH92A9nlrwP6irGBG/ibszr/eRmHQzruwtEeOP/LyEs5rgz/qlKu9\r\ndyusvL4qs6Z+GaHljXuKLuMbpYmVjRznYx8ivUtaB8Z79DXumbja0K/5bcUq\r\n0jpwOpWOI8/MNCo+Bid7Nu8ghsgyuAtXQk6x2F0zCONr35ZCCjwfQY/qToeX\r\n3yeNXM67C8iVYvxfQjNJwtUMCzJgHgRY70YmnpIkGMAdlTpAm7MhdcOuAXZ6\r\nD3JeEUYz8jgtA4dE79Tu4TpPPqT22YQbjuP3Gwsljbj9acwMkTvugKpthHG5\r\nQIBDJUdi9Z5aOVkZ4M21aIio58T++hD4LNdVfKZQAapiHbSQlMQmAhPYcX/O\r\nL6OLwuyd0XSLG7yOtg05+dj8RzqlSOTr4tvRjy/6LM8uBezac9WYlJVNWfgm\r\nlWbwVVNhJAkaXAEyMBSbzSV0FJ3s0TOv09/YfCOn5i4KfstGlAlts+f6o4pA\r\nKI1g0RJC7dgYdDdzvqd0QOWfImJ2adXq/ZY=\r\n=xZJt\r\n-----END PGP SIGNATURE-----\r\n","size":9193,"noattachment":false,"key":"/@wdio/mocha-framework/-/@wdio/mocha-framework-8.0.0-alpha.537.tgz"},"type":"module","types":"./build/index.d.ts","engines":{"node":"^16.13 || >=18"},"exports":{".":"./build/index.js","./common":"./build/common/utils.js"},"gitHead":"c2761a17597c5dfbd349445fc203183fb004c3f5","_npmUser":{"name":"wdio-user","email":"christian+webdriverio@saucelabs.com"},"repository":{"url":"git://github.com/webdriverio/webdriverio.git","type":"git","directory":"packages/wdio-mocha-framework"},"_npmVersion":"lerna/6.0.3/node@v18.12.0+x64 (linux)","description":"A WebdriverIO plugin. Adapter for Mocha testing framework.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"mocha":"^10.0.0","@wdio/types":"8.0.0-alpha.537+c2761a175","@wdio/utils":"8.0.0-alpha.537+c2761a175","@types/mocha":"^10.0.0","@wdio/logger":"8.0.0-alpha.537+c2761a175"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/node":"^18.0.0"},"typeScriptVersion":"3.8.3","_npmOperationalInternal":{"tmp":"tmp/mocha-framework_8.0.0-alpha.537_1668154596332_0.14084780128990748","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":1668154596557,"_cnpm_publish_time":1668154596557,"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"}}