{"name":"gulp-mocha","version":"8.0.0","description":"Run Mocha tests","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/gulp-mocha.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava"},"keywords":["gulpplugin","mocha","test","testing","unit","framework","runner","tdd","bdd","qunit","spec","tap"],"dependencies":{"dargs":"^7.0.0","execa":"^5.0.0","mocha":"^8.3.0","plugin-error":"^1.0.1","supports-color":"^8.1.1","through2":"^4.0.2"},"devDependencies":{"ava":"^2.3.0","gulp":"^4.0.2","p-event":"^4.2.0","vinyl":"^2.2.1","xo":"^0.37.1"},"peerDependencies":{"gulp":">=4"},"peerDependenciesMeta":{"gulp":{"optional":true}},"xo":{"ignores":["test/fixtures"],"rules":{"ava/no-ignored-test-files":"off"}},"ava":{"files":["test/test.js"]},"gitHead":"2f0b8108fb7a892cb658e5fb15fb003e0c40545f","bugs":{"url":"https://github.com/sindresorhus/gulp-mocha/issues"},"homepage":"https://github.com/sindresorhus/gulp-mocha#readme","_id":"gulp-mocha@8.0.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-FdbBydfzszaES/gXfwD6RFq1yJTj4Z6328R1yqsmhf+t7hW2aj9ZD9Hz8boQShjZ9J8/w6tQBM5mePb8K2pbqA==","shasum":"7e02677782573a9dc844a9ee1d6de89ebccff2d6","tarball":"http://registry-npm.ywwl.com/gulp-mocha/download/gulp-mocha-8.0.0.tgz","fileCount":5,"unpackedSize":7092,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLhY0CRA9TVsSAnZWagAA/scQAJz8KKHHHHV21Hf9Cvyb\nNmgraQWCu5Pr2I2YibKg6dlt5dZATQWOD1OFBt1yAnB6vmprUbIQw5NGGnYd\nRpiXoxm8PYJ/stjy0UQ8AfyuhuX4fvU02WPry9mwpAPL6e4/dDm1O6YxmFa5\nWsmUVh2xYVYh6TOB+tGohKj/6LwhvVxytm46QEthFutd3umfeoj0F0nFTueO\nlsocw3CWTJDa6ClUCe8s60UKZjA6mBtskOULOz75LDZqtNUurP/37HPAjdIy\nkQPcdGKyKyt9dN/Z8h2gLTJZ59lBOROOml9yuJIqXAAH0+7wE2B8vDw3nlVc\nM6fomnhSpBwZC21imlLmbvhZF87c+qBQeU5gQ18Q30H19FahdIAcheE/0pl8\nF/qduqoKo/141gc4NL5imWqonBRvq78qZNZ1SSYTytgnJAEKuFjsPxywr+1R\nCkEfpNqiN7Yr1d0Df99tLE5JaCl5WufYUenuTutfr5jmRfhES/dI5NATA39Y\nAEGq6oJIutv+2qrZW8NBTFs9O+er37xsz2uA8yfxa82Xi3TaxGfDN8TCA8aw\nkKEGMXqnfuqqa4KK+GMy/yaXh0coBnAEK6vmxJZkVnMnJYWmYR9s+EepIIb3\niybZ6bXbvnMoGWABkyNSz+ZXPtGkVh4Gl4DH4kzjthApMHN6VKfAC3VEFvTe\nwEmX\r\n=OAjj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDlrlkiyQk9yFiKu29zle7KJBERb7bU3w7w/q51rCwYYAiEAn3LZWW3C6q9pnkC40Y+YxNUzvW61tQMdbCV6hW+aVLs="}],"size":3439,"noattachment":false,"key":"/gulp-mocha/-/gulp-mocha-8.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-mocha_8.0.0_1613633076088_0.4623682463232748"},"_hasShrinkwrap":false,"readme":"# gulp-mocha\n\n> Run [Mocha](https://github.com/mochajs/mocha) tests\n\n*Keep in mind that this is just a thin wrapper around Mocha and your issue is most likely with Mocha.*\n\n## Install\n\n```sh\nnpm install --save-dev gulp-mocha\n```\n\n## Usage\n\n```js\nimport gulp from 'gulp';\nimport mocha from 'gulp-mocha';\n\nexport default () => (\n\tgulp.src('test.js', {read: false})\n\t\t// `gulp-mocha` needs file paths so you cannot have any plugins before it.\n\t\t.pipe(mocha({reporter: 'nyan'}))\n);\n```\n\n## API\n\n### mocha(options?)\n\n#### options\n\nType: `object`\n\nOptions are passed directly to the `mocha` binary, so you can use any its [command-line options](http://mochajs.org/#usage) in a camelCased form. Arrays and key/value objects are correctly converted to the comma separated list format Mocha expects. Listed below are some of the more commonly used options:\n\n##### ui\n\nType: `string`\\\nDefault: `'bdd'`\\\nValues: `'bdd' | 'tdd' | 'qunit' | 'exports'`\n\nThe interface to use.\n\n##### reporter\n\nType: `string`\\\nDefault: `spec`\\\nValues: [Reporters](https://github.com/mochajs/mocha/tree/master/lib/reporters)\n\nThe reporter that will be used.\n\nThis option can also be used to utilize third-party reporters. For example, if you `npm install mocha-lcov-reporter` you can then do use `mocha-lcov-reporter` as value.\n\n##### reporterOptions\n\nType: `object`\\\nExample: `{reportFilename: 'index.html'}`\n\nReporter specific options.\n\n##### globals\n\nType: `string[]`\n\nList of accepted global variable names, example `['YUI']`. Accepts wildcards to match multiple global variables, e.g. `['gulp*']` or even `['*']`. See [Mocha globals option](http://mochajs.org/#globals-option).\n\n##### timeout\n\nType: `number`\\\nDefault: `2000`\n\nTest-case timeout in milliseconds.\n\n##### bail\n\nType: `boolean`\\\nDefault: `false`\n\nBail on the first test failure.\n\n##### checkLeaks\n\nType: `boolean`\\\nDefault: `false`\n\nCheck for global variable leaks.\n\n##### grep\n\nType: `string`\n\nOnly run tests matching the given pattern which is internally compiled to a RegExp.\n\n##### require\n\nType: `string[]`\n\nRequire custom modules before tests are run.\n\n##### compilers\n\nType: `string`\\\nExample: `js:babel-core/register`\n\nSpecify a compiler.\n\n## FAQ\n\n### Test suite not exiting\n\nIf your test suite is not exiting it might be because you still have a lingering callback, most often caused by an open database connection. You should close this connection or do the following:\n\n```js\nexport default () => (\n\tgulp.src('test.js')\n\t\t.pipe(mocha())\n\t\t.once('error', err => {\n\t\t\tconsole.error(err);\n\t\t\tprocess.exit(1);\n\t\t})\n\t\t.once('end', () => {\n\t\t\tprocess.exit();\n\t\t})\n);\n```\n\nOr you might just need to pass the `exit` option:\n\n```js\nexport const test = () => (\n\tgulp.src(['test/**/*.js'], {read: false})\n\t\t.pipe(mocha({reporter: 'list', exit: true}))\n\t\t.on('error', console.error)\n);\n```\n","publish_time":1613633076244,"_cnpm_publish_time":1613633076244,"dist-tags":{"latest":"10.0.1"}}