Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump mocha from 8.1.3 to 8.2.0 (#1020)
[//]: # (dependabot-start)⚠️ **Dependabot is rebasing this PR**⚠️ If you make any changes to it yourself then they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [mocha](https://github.com/mochajs/mocha) from 8.1.3 to 8.2.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/mochajs/mocha/releases">mocha's releases</a>.</em></p> <blockquote> <h2>v8.2.0</h2> <h1>8.2.0 / 2020-10-16</h1> <p>The major feature added in v8.2.0 is addition of support for <a href="https://mochajs.org/#global-fixtures"><em>global fixtures</em></a>.</p> <p>While Mocha has always had the ability to run setup and teardown via a hook (e.g., a <code>before()</code> at the top level of a test file) when running tests in serial, Mocha v8.0.0 added support for parallel runs. Parallel runs are <em>incompatible</em> with this strategy; e.g., a top-level <code>before()</code> would only run for the file in which it was defined.</p> <p>With <a href="https://mochajs.org/#global-fixtures">global fixtures</a>, Mocha can now perform user-defined setup and teardown <em>regardless</em> of mode, and these fixtures are guaranteed to run <em>once and only once</em>. This holds for parallel mode, serial mode, and even "watch" mode (the teardown will run once you hit Ctrl-C, just before Mocha finally exits). Tasks such as starting and stopping servers are well-suited to global fixtures, but not sharing resources--global fixtures do <em>not</em> share context with your test files (but they do share context with each other).</p> <p>Here's a short example of usage:</p> <pre lang="js"><code>// fixtures.js <p>// can be async or not exports.mochaGlobalSetup = async function() { this.server = await startSomeServer({port: process.env.TEST_PORT}); console.log(<code>server running on port ${this.server.port}</code>); };</p> <p>exports.mochaGlobalTeardown = async function() { // the context (<code>this</code>) is shared, but not with the test files await this.server.stop(); console.log(<code>server on port ${this.server.port} stopped</code>); };</p> <p>// this file can contain root hook plugins as well! // exports.mochaHooks = { ... } </code></pre></p> <p>Fixtures are loaded with <code>--require</code>, e.g., <code>mocha --require fixtures.js</code>.</p> <p>For detailed information, please see the <a href="https://mochajs.org/#global-fixtures">documentation</a> and this handy-dandy <a href="https://mochajs.org/#test-fixture-decision-tree-wizard-thing">flowchart</a> to help understand the differences between hooks, root hook plugins, and global fixtures (and when you should use each).</p> <h2>:tada: Enhancements</h2> <ul> <li><a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4308">#4308</a>: Support run-once <a href="https://mochajs.org/#global-fixtures">global setup & teardown fixtures</a> (<a href="https://github.com/boneskull"><strong>@boneskull</strong></a>)</li> <li><a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4442">#4442</a>: Multi-part extensions (e.g., <code>test.js</code>) now usable with <code>--extension</code> option (<a href="https://github.com/jordanstephens"><strong>@jordanstephens</strong></a>)</li> <li><a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4472">#4472</a>: Leading dots (e.g., <code>.js</code>, <code>.test.js</code>) now usable with <code>--extension</code> option (<a href="https://github.com/boneskull"><strong>@boneskull</strong></a>)</li> <li><a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4434">#4434</a>: Output of <code>json</code> reporter now contains <code>speed</code> ("fast"/"medium"/"slow") property (<a href="https://github.com/wwhurin"><strong>@wwhurin</strong></a>)</li> <li><a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4464">#4464</a>: Errors thrown by serializer in parallel mode now have error codes (<a href="https://github.com/evaline-ju"><strong>@evaline-ju</strong></a>)</li> </ul> <p><em>For implementors of custom reporters:</em></p> <ul> <li><a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4409">#4409</a>: Parallel mode and custom reporter improvements (<a href="https://github.com/boneskull"><strong>@boneskull</strong></a>): <ul> <li>Support custom worker-process-only reporters (<code>Runner.prototype.workerReporter()</code>); reporters should subclass <code>ParallelBufferedReporter</code> in <code>mocha/lib/nodejs/reporters/parallel-buffered</code></li> <li>Allow opt-in of object reference matching for "sufficiently advanced" custom reporters (<code>Runner.prototype.linkPartialObjects()</code>); use if strict object equality is needed when consuming <code>Runner</code> event data</li> <li>Enable detection of parallel mode (<code>Runner.prototype.isParallelMode()</code>)</li> </ul> </li> </ul> <h2>:bug: Fixes</h2> <!-- raw HTML omitted --> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/mochajs/mocha/blob/master/CHANGELOG.md">mocha's changelog</a>.</em></p> <blockquote> <h1>8.2.0 / 2020-10-16</h1> <p>The major feature added in v8.2.0 is addition of support for <a href="https://mochajs.org/#global-fixtures"><em>global fixtures</em></a>.</p> <p>While Mocha has always had the ability to run setup and teardown via a hook (e.g., a <code>before()</code> at the top level of a test file) when running tests in serial, Mocha v8.0.0 added support for parallel runs. Parallel runs are <em>incompatible</em> with this strategy; e.g., a top-level <code>before()</code> would only run for the file in which it was defined.</p> <p>With <a href="https://mochajs.org/#global-fixtures">global fixtures</a>, Mocha can now perform user-defined setup and teardown <em>regardless</em> of mode, and these fixtures are guaranteed to run <em>once and only once</em>. This holds for parallel mode, serial mode, and even "watch" mode (the teardown will run once you hit Ctrl-C, just before Mocha finally exits). Tasks such as starting and stopping servers are well-suited to global fixtures, but not sharing resources--global fixtures do <em>not</em> share context with your test files (but they do share context with each other).</p> <p>Here's a short example of usage:</p> <pre lang="js"><code>// fixtures.js <p>// can be async or not exports.mochaGlobalSetup = async function() { this.server = await startSomeServer({port: process.env.TEST_PORT}); console.log(<code>server running on port ${this.server.port}</code>); };</p> <p>exports.mochaGlobalTeardown = async function() { // the context (<code>this</code>) is shared, but not with the test files await this.server.stop(); console.log(<code>server on port ${this.server.port} stopped</code>); };</p> <p>// this file can contain root hook plugins as well! // exports.mochaHooks = { ... } </code></pre></p> <p>Fixtures are loaded with <code>--require</code>, e.g., <code>mocha --require fixtures.js</code>.</p> <p>For detailed information, please see the <a href="https://mochajs.org/#global-fixtures">documentation</a> and this handy-dandy <a href="https://mochajs.org/#test-fixture-decision-tree-wizard-thing">flowchart</a> to help understand the differences between hooks, root hook plugins, and global fixtures (and when you should use each).</p> <h2>:tada: Enhancements</h2> <ul> <li><a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4308">#4308</a>: Support run-once <a href="https://mochajs.org/#global-fixtures">global setup & teardown fixtures</a> (<a href="https://github.com/boneskull"><strong>@boneskull</strong></a>)</li> <li><a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4442">#4442</a>: Multi-part extensions (e.g., <code>test.js</code>) now usable with <code>--extension</code> option (<a href="https://github.com/jordanstephens"><strong>@jordanstephens</strong></a>)</li> <li><a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4472">#4472</a>: Leading dots (e.g., <code>.js</code>, <code>.test.js</code>) now usable with <code>--extension</code> option (<a href="https://github.com/boneskull"><strong>@boneskull</strong></a>)</li> <li><a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4434">#4434</a>: Output of <code>json</code> reporter now contains <code>speed</code> ("fast"/"medium"/"slow") property (<a href="https://github.com/wwhurin"><strong>@wwhurin</strong></a>)</li> <li><a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4464">#4464</a>: Errors thrown by serializer in parallel mode now have error codes (<a href="https://github.com/evaline-ju"><strong>@evaline-ju</strong></a>)</li> </ul> <p><em>For implementors of custom reporters:</em></p> <ul> <li><a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4409">#4409</a>: Parallel mode and custom reporter improvements (<a href="https://github.com/boneskull"><strong>@boneskull</strong></a>): <ul> <li>Support custom worker-process-only reporters (<code>Runner.prototype.workerReporter()</code>); reporters should subclass <code>ParallelBufferedReporter</code> in <code>mocha/lib/nodejs/reporters/parallel-buffered</code></li> <li>Allow opt-in of object reference matching for "sufficiently advanced" custom reporters (<code>Runner.prototype.linkPartialObjects()</code>); use if strict object equality is needed when consuming <code>Runner</code> event data</li> <li>Enable detection of parallel mode (<code>Runner.prototype.isParallelMode()</code>)</li> </ul> </li> </ul> <h2>:bug: Fixes</h2> <!-- raw HTML omitted --> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/mochajs/mocha/commit/afe8daac603d398743dd5572f497ba088193bf53"><code>afe8daa</code></a> Release v8.2.0</li> <li><a href="https://github.com/mochajs/mocha/commit/20d3d4cab80d65096fbb15eb5eaf14abdcc587dd"><code>20d3d4c</code></a> update CHANGELOG for v8.2.0 [ci skip]</li> <li><a href="https://github.com/mochajs/mocha/commit/932c09a607040e9aaee11a4dc2a5397831574c0c"><code>932c09a</code></a> fix scripts/linkify-changelog to not blast fenced code blocks</li> <li><a href="https://github.com/mochajs/mocha/commit/3b333ecf6168943605caa1bcd07b2acf38835057"><code>3b333ec</code></a> chore(deps): chokidar@3.4.3</li> <li><a href="https://github.com/mochajs/mocha/commit/058b2e7484f0040e5ff0b4d2e37bf41f2cf50da3"><code>058b2e7</code></a> attempt to force colors in karma config</li> <li><a href="https://github.com/mochajs/mocha/commit/60e3662511dcdaa0b854909b866841191a32771a"><code>60e3662</code></a> replace promise.allsettled with @ungap/promise-all-settled; closes <a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4474">#4474</a></li> <li><a href="https://github.com/mochajs/mocha/commit/f132448ee51d9b09efab29099756f3b15a1a98ba"><code>f132448</code></a> remove duplicated/problem reporter tests; closes <a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4469">#4469</a></li> <li><a href="https://github.com/mochajs/mocha/commit/31116dbf825487490d5416c95b2685e18e7359d3"><code>31116db</code></a> fix: remove job count from parallel mode debug log (<a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4416">#4416</a>)</li> <li><a href="https://github.com/mochajs/mocha/commit/478ca6ac3d05d7d789d3ec22328b3a2ce859e341"><code>478ca6a</code></a> add "fixture flowchart" to docs (<a href="https://github-redirect.dependabot.com/mochajs/mocha/issues/4440">#4440</a>)</li> <li><a href="https://github.com/mochajs/mocha/commit/9c28990f1d562aff3ceb410496c46266099a9d5f"><code>9c28990</code></a> support leading dots in --extension</li> <li>Additional commits viewable in <a href="https://github.com/mochajs/mocha/compare/v8.1.3...v8.2.0">compare view</a></li> </ul> </details> <br /> [](https://dependabot.com/compatibility-score/?dependency-name=mocha&package-manager=npm_and_yarn&previous-version=8.1.3&new-version=8.2.0) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details>
- Loading branch information