diff --git a/.eslintrc.yml b/.eslintrc.yml index 6a3110634b..466e83affb 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -3,13 +3,12 @@ extends: - semistandard - plugin:prettier/recommended env: - node: yes - browser: yes + node: true + browser: true parserOptions: ecmaVersion: 5 ecmaFeatures: - globalReturn: no - jsx: no + jsx: false sourceType: script rules: strict: @@ -31,14 +30,14 @@ overrides: parserOptions: ecmaVersion: 2018 env: - browser: no + browser: false - files: - test/**/*.{js,mjs} env: - mocha: yes + mocha: true globals: - expect: no + expect: readonly - files: - bin/* - lib/**/*.js diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000000..e343853b2a --- /dev/null +++ b/AUTHORS @@ -0,0 +1,490 @@ +# Authors ordered by first contribution. + +TJ Holowaychuk +James Carr +Fredrik Lindin +Konstantin Käfer +David Henderson +Harry Brundage +Quang Van +hokaccha +Guillermo Rauch +FARKAS Máté +Ben Lindsey +Steve Mason +Ryunosuke SATO +Nathan Rajlich +Raynos +Yuest Wang +Maciej Małecki +Joshua Krall +Fedor Indutny +Will Langstroth +Attila Domokos +Jussi Virtanen +Phil Sung +vlad +Paul Miller +Bjørge Næss +Jeff Kunkle +Fabio M. Costa +Michael Riley +Ian Young +Jakub Nešetřil +Tyson Tate +Jo Liss +Arian Stolwijk +Brendan Nee +Xavier Antoviaque +Domenic Denicola +Brian Beck +Dave McKenna +Richard Dingwall +Cory Thomas +R56 +Ian Storm Taylor +Andreas Brekken +abrkn +Nathan Bowser +László Bácsi +Atsuya Takagi +Gavin Mogan +fengmk2 +Seiya Konno +Jan Lehnardt +Matt Robenolt +Jonas Westerlund +Koen Punt +Jason Barry +Austin Birch +Adam Crabtree +Casey Foster +Jonathan Creamer +Brian Moore +traleig1 +John Firebaugh +airportyh +Aaron Heckmann +Russ Bradberry +Ivan +Corey Butler +Paul Armstrong +Herman Junge +Michael Schoonmaker +Wil Moore III +Pete Hawkins +tgautier@yahoo.com +yuitest +Matt Smith +Katie Gengler +Bryan Donovan +Nathan Alderson +Shawn Krisman +Merrick Christensen +Timo Tijhof +Simon Gaeremynck +Jaakko Salonen +Jonathan Rajavuori +Forbes Lindesay +Standa Opichal +Matthew Shanley +James Lal +Greg Perkins +Gareth Murphy +Juzer Ali +Sasha Koss +Justin DuJardin +Frederico Silva +Jesse Dailey +Yanis Wang +fcrisci +Javier Aranda +Florian Margaine +fool2fish +James Bowes +Valentin Agachi +Mathieu Desvé +Glen Huang +Simon Goumaz +Alexander Early +Jimmy Cuadra +Russell Munson +lodr +Liam Newman +Dmitry Shirokov +Fredrik Enestad +Kirill Korolyov +grasGendarme +Mike Pennisi +Victor Costan +Tim Ehat +Jeremy Martin +Mal Graty +Di Wu +badunk +Marc Kuo +Sindre Sorhus +Salehen Shovon Rahman +eiji.ienaga +Oscar Godson +Daniel Stockman +Stephen Mathieson +Travis Jeffery +Andreas Lind Petersen +Romain Prieto +JP Bochi +Teddy Zeenny +Roman Neuhauser +XhmikosR +Brian Lalor +Refael Ackermann +ChrisWren +Andrew Nesbitt +berni +Andrey Popp <8mayday@gmail.com> +Brian M. Carlson +Michael Olson +Arnaud Brousseau +Peter Rust +Vadim Nikitin +Roman Shtylman +Tapiwa Kelvin +Rustem Mustafin +Glen Mailer +Nathan Black +sebv +andy matthews +Benjie Gillam +Noshir Patel +Ben Noordhuis +Jacob Wejendorp +claudyus +Denis Bardadym +Connor Dunn +Jonathan Ong +Harish +Michal Charemza +startswithaj +Gareth Aye +Nick Fitzgerald +Jan Kopriva +kavun +Christoffer Hallas +Jonathan Park +Devin Weaver +John Doty +Shaine Hatch +Ben Bradley +qiuzuhui +Jean Ponchon +Linus Unnebäck +Mattias Tidlund +Matija Marohnić +Michael Jackson +Joel Kemp +Zsolt Takács +jsdevel +lakmeer +Joshua Appelman +Christopher Hiller +Michael Demmer +Giovanni Bassi +Panu Horsmalahti +nishigori +Nicolo Taddei +Diogo Monteiro +mrShturman +PoppinL +samuel goldszmidt +Rob Wu +Kent C. Dodds +Kevin Conway +Dominique Quatravaux +zhiyelee +Quanlong He +omardelarosa +Ariel Mashraki +Sean Lang +David da Silva Contín +C. Scott Ananian +Douglas Christopher Wilson +Richard Knop +Buck Doyle +Jonas Dohse +oveddan +monowerker +Marcello Bastea-Forte +Benoît Zugmeyer +Vlad Magdalin +Moshe Kolodny +Tom Coquereau +Timothy Gu +Ian Zamojc +Martin Marko +Chris Buckley +Jake Craige +Fede Ramirez +Parker Moore +Todd Agulnick +Daniel St. Jules +Rico Sta. Cruz +Anis Safine +Adam Gruber +Sam Mussell +klaemo +Stewart Taylor +Jordan Sexton +Keith Cirkel +Andrii Shumada +Dominic Barnes +Maximilian Antoni +Sune Simonsen +Kyle Mitchell +James Nylen +Jonathan Delgado +Jake Marsh +slyg +Tomer Eskenazi +Jeff Schilling +Ryan Hubbard +amsul +Kevin Kirsche +Gabriel Silk +Johnathon Sanders +Max Goodman +Nathan Houle +Ben Vinegar +Duncan Beevers +Tingan Ho +Guy Arye +Nik Nyby +Artem Govorov +Ajay Kodali +Ryan Tablada +Pavel Zubkou +gigadude +Outsider +Jason Lai +Aaron Krause +wsw +Kevin Burke +Berker Peksag +nexdrew +Hugo Giraudel +Rich Trott +Matt Giles +Joey Cozza +Kris Rasmussen +James G. Kim +Sorin Iclanzan +Rob Raux +Sergey Simonchik +Ian W. Remmel +tmont +John Reeves +Fagner Brack +Mark Banner +Michiel de Jong +Benoit Larroque +Charles Lowell +Joao Moreno +Long Ho +Robert Rossmann +Aaron Hamid +Stone +Tom Hughes +Soel +Mislav Marohnić +Prayag Verma +Frank Leon Rose +Ryan Shaw +Thedark1337 +Gyandeep Singh +ryym +Josh Lory +Jonathan Kim +Al Scott +Tobias Bieniek +Benjamin Eidelman +Julien Wajsberg +sarehag +Alexander Shepelin +OlegTsyba +Xavier Damman +Mick Brooks +Erik Eng +Kelong Wang +Jérémie Astori +ScottFreeCode +Sergio Santoro +Adrian Ludwig +Anders Olsen Sandvik +Thomas Grainger +jimenglish81 +Avi Vahl +Jason Leyba +silentcloud +Dmitriy Simushev +simov +Ross Warren +Benson Trent +rmacklin +Rob Loach +Shinnosuke Watanabe +Callum Macrae +ELLIOTTCABLE +Anton +Peter Müller +APerson +not-an-aardvark +Alhadis +Slobodan Mišković +Philip M. White +Christian +anton +Dmitry Sorin +Vivek Ganesan +Josh Eversmann +inxorable +Ben Harris +Aaron Petcoff +Matt Bierner +Ville Saukkonen +Ben Hutchison +Volker Buzek +Scott Kao +Sulabh Bista +rotemdan +Fumiaki MATSUSHIMA +Markus Tacker +Christoph Neuroth +Enric Pallerols +Craig Taub +Yoshiya Hinosawa +Sebastian Van Sande +Chris Lamb +Igwe Kalu +Kevin Wang +Laurence Rowe +Jakob Krigovsky +Chris +Kunal Nagpal +elergy +Jupp Müller +Poprádi Árpád +Charlie Rudolph +Angelica Valenta +Jan Krems +Josh Soref +solodynamo +Eli Skeggs +Nikolaos Georgiou +olsonpm +David Neubauer +Darryl Pogue +38elements +Guangcong Luo +David M. Lee +tripu +Pat Finnigan +Eugene Tiutiunnyk +Aaron Brady +Charles Merriam +Kevin Partington +Lane Kelly +Cube +yehiyam +Jon Surrell +现充 +Ahmad Bamieh +Capacitor Set +Anthony +Can Oztokmak +ImgBot <31427850+ImgBotApp@users.noreply.github.com> +Thomas Broadley +FND +Dina Berry +Marais Rossouw +Andrew Krawchyk <903716+akrawchyk@users.noreply.github.com> +Ted Yavuzkurt +Daniel Ruf +Harry Wolff +Valeri Karpov +Silvio Massari +Joseph Lin +Honza Javorek +Harry Sarson +Anish Karandikar +Victor +Emanuele +Thomas Vantuycom +Alex Bainter +Jerry Muzsik +Nicolas Girault +dfberry +DavNej +Paul Roebuck +Tim Harshman +Charles Samborski +Tobias Mollstam +Ben Glassman +Mark Owsiak +fargies +Marc Udoff +gizemkeser <44727928+gizemkeser@users.noreply.github.com> +Fin Chen +Brittany Moore +Fábio Santos +Jayasankar +Juerg B <44573692+juergba@users.noreply.github.com> +Svetlana <39729453+Lana-Light@users.noreply.github.com> +Martijn Cuppens +Anna Henningsen +Andreas Lind +Chen Yangjian <252317+cyjake@users.noreply.github.com> +Corey Farrell +Wanseob Lim +Szauka <33459309+Szauka@users.noreply.github.com> +Brian Tomlin +Sylvain +Adam Ginzberg +XhmikosR +Gastón I. Silva +Andrew Bradley +Andrew Bradley +DavidLi119 +James D. Rogers +Carl-Erik Kopseng +juergba +Sylvester Keil +Bjorn Stromberg +Stephen Hess +toyjhlee +Piotr Kuczynski +Thomas Scholtes +Brian Lagerman <49239617+brian-lagerman@users.noreply.github.com> +Pascal +Gabe Gorelick +Daniel Ruf <827205+DanielRuf@users.noreply.github.com> +Mario Díaz Ceñera <46492068+MarioDiaz98@users.noreply.github.com> +Oliver Salzburg +Sona Lee +Park Seong-beom +EunChan Park +Mia +Lindsay-Needs-Sleep <51773923+Lindsay-Needs-Sleep@users.noreply.github.com> +Soobin Bak +Peter Schmidt +SheetJSDev +HyunSangHan +Jan-Philip Gehrcke +Robert Kieffer +Saerom Bang +Kyle Fuller +Rens Groothuijsen +Hugo Kim +KyoungWan +Zirak +Christian Holm + +# Generated by scripts/update-authors.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 998c625ff2..3d439b03e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +# 7.0.1 / 2020-01-25 + +## :bug: Fixes + +- [#4165](https://github.com/mochajs/mocha/issues/4165): Fix exception when skipping tests programmatically ([**@juergba**](https://github.com/juergba)) +- [#4153](https://github.com/mochajs/mocha/issues/4153): Restore backwards compatibility for `reporterOptions` ([**@holm**](https://github.com/holm)) +- [#4150](https://github.com/mochajs/mocha/issues/4150): Fix recovery of an open test upon uncaught exception ([**@juergba**](https://github.com/juergba)) +- [#4147](https://github.com/mochajs/mocha/issues/4147): Fix regression of leaking uncaught exception handler ([**@juergba**](https://github.com/juergba)) + +## :book: Documentation + +- [#4146](https://github.com/mochajs/mocha/issues/4146): Update copyright & trademark notices per OJSF ([**@boneskull**](https://github.com/boneskull)) +- [#4140](https://github.com/mochajs/mocha/issues/4140): Fix broken links ([**@KyoungWan**](https://github.com/KyoungWan)) + +## :nut_and_bolt: Other + +- [#4133](https://github.com/mochajs/mocha/issues/4133): Print more descriptive error message ([**@Zirak**](https://github.com/Zirak)) + # 7.0.0 / 2020-01-05 ## :boom: Breaking Changes @@ -561,1347 +579,3 @@ Welcome [@vkarpov15](https://github.com/vkarpov15) to the team! - [#3185](https://github.com/mochajs/mocha/issues/3185): Add Node.js v9 to build matrix; remove v7 ([@xxczaki](https://github.com/xxczaki)) - [#3172](https://github.com/mochajs/mocha/issues/3172): Markdown linting ([@boneskull](https://github.com/boneskull)) - Test & Netlify updates ([@Munter](https://github.com/munter), [@boneskull](https://github.com/boneskull)) - -# 4.1.0 / 2017-12-28 - -This is mainly a "housekeeping" release. - -Welcome [@Bamieh](https://github.com/Bamieh) and [@xxczaki](https://github.com/xxczaki) to the team! - -## :bug: Fixes - -- [#2661](https://github.com/mochajs/mocha/issues/2661): `progress` reporter now accepts reporter options ([@canoztokmak](https://github.com/canoztokmak)) -- [#3142](https://github.com/mochajs/mocha/issues/3142): `xit` in `bdd` interface now properly returns its `Test` object ([@Bamieh](https://github.com/Bamieh)) -- [#3075](https://github.com/mochajs/mocha/pull/3075): Diffs now computed eagerly to avoid misinformation when reported ([@abrady0](https://github.com/abrady0)) -- [#2745](https://github.com/mochajs/mocha/issues/2745): `--help` will now help you even if you have a `mocha.opts` ([@Zarel](https://github.com/Zarel)) - -## :tada: Enhancements - -- [#2514](https://github.com/mochajs/mocha/issues/2514): The `--no-diff` flag will completely disable diff output ([@CapacitorSet](https://github.com/CapacitorSet)) -- [#3058](https://github.com/mochajs/mocha/issues/3058): All "setters" in Mocha's API are now also "getters" if called without arguments ([@makepanic](https://github.com/makepanic)) - -## :book: Documentation - -- [#3170](https://github.com/mochajs/mocha/pull/3170): Optimization and site speed improvements ([@Munter](https://github.com/munter)) -- [#2987](https://github.com/mochajs/mocha/issues/2987): Moved the old [site repo](https://github.com/mochajs/mochajs.github.io) into the main repo under `docs/` ([@boneskull](https://github.com/boneskull)) -- [#2896](https://github.com/mochajs/mocha/issues/2896): Add [maintainer guide](https://github.com/mochajs/mocha/blob/master/MAINTAINERS.md) ([@boneskull](https://github.com/boneskull)) -- Various fixes and updates ([@xxczaki](https://github.com/xxczaki), [@maty21](https://github.com/maty21), [@leedm777](https://github.com/leedm777)) - -## :nut_and_bolt: Other - -- Test improvements and fixes ([@eugenet8k](https://github.com/eugenet8k), [@ngeor](https://github.com/ngeor), [@38elements](https://github.com/38elements), [@Gerhut](https://github.com/Gerhut), [@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull)) -- Refactoring and cruft excision ([@38elements](https://github.com/38elements), [@Bamieh](https://github.com/Bamieh), [@finnigantime](https://github.com/finnigantime), [@boneskull](https://github.com/boneskull)) - -# 4.0.1 / 2017-10-05 - -## :bug: Fixes - -- [#3051](https://github.com/mochajs/mocha/pull/3051): Upgrade Growl to v1.10.3 to fix its [peer dep problems](https://github.com/tj/node-growl/pull/68) ([@dpogue](https://github.com/dpogue)) - -# 4.0.0 / 2017-10-02 - -You might want to read this before filing a new bug! :stuck_out_tongue_closed_eyes: - -## :boom: Breaking Changes - -For more info, please [read this article](https://boneskull.com/mocha-v4-nears-release/). - -### Compatibility - -- [#3016](https://github.com/mochajs/mocha/issues/3016): Drop support for unmaintained versions of Node.js ([@boneskull](https://github.com/boneskull)): - - 0.10.x - - 0.11.x - - 0.12.x - - iojs (any) - - 5.x.x -- [#2979](https://github.com/mochajs/mocha/issues/2979): Drop support for non-ES5-compliant browsers ([@boneskull](https://github.com/boneskull)): - - IE7 - - IE8 - - PhantomJS 1.x -- [#2615](https://github.com/mochajs/mocha/issues/2615): Drop Bower support; old versions (3.x, etc.) will remain available ([@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull)) - -### Default Behavior - -- [#2879](https://github.com/mochajs/mocha/issues/2879): By default, Mocha will no longer force the process to exit once all tests complete. This means any test code (or code under test) which would normally prevent `node` from exiting will do so when run in Mocha. Supply the `--exit` flag to revert to pre-v4.0.0 behavior ([@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull)) - -### Reporter Output - -- [#2095](https://github.com/mochajs/mocha/issues/2095): Remove `stdout:` prefix from browser reporter logs ([@skeggse](https://github.com/skeggse)) -- [#2295](https://github.com/mochajs/mocha/issues/2295): Add separator in "unified diff" output ([@olsonpm](https://github.com/olsonpm)) -- [#2686](https://github.com/mochajs/mocha/issues/2686): Print failure message when `--forbid-pending` or `--forbid-only` is specified ([@ScottFreeCode](https://github.com/ScottFreeCode)) -- [#2814](https://github.com/mochajs/mocha/pull/2814): Indent contexts for better readability when reporting failures ([@charlierudolph](https://github.com/charlierudolph)) - -## :-1: Deprecations - -- [#2493](https://github.com/mochajs/mocha/issues/2493): The `--compilers` command-line option is now soft-deprecated and will emit a warning on `STDERR`. Read [this](https://github.com/mochajs/mocha/wiki/compilers-deprecation) for more info and workarounds ([@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull)) - -## :tada: Enhancements - -- [#2628](https://github.com/mochajs/mocha/issues/2628): Allow override of default test suite name in XUnit reporter ([@ngeor](https://github.com/ngeor)) - -## :book: Documentation - -- [#3020](https://github.com/mochajs/mocha/pull/3020): Link to CLA in `README.md` and `CONTRIBUTING.md` ([@skeggse](https://github.com/skeggse)) - -## :nut_and_bolt: Other - -- [#2890](https://github.com/mochajs/mocha/issues/2890): Speed up build by (re-)consolidating SauceLabs tests ([@boneskull](https://github.com/boneskull)) - -# 3.5.3 / 2017-09-11 - -## :bug: Fixes - -- [#3003](https://github.com/mochajs/mocha/pull/3003): Fix invalid entities in xUnit reporter first appearing in v3.5.1 ([@jkrems](https://github.com/jkrems)) - -# 3.5.2 / 2017-09-10 - -## :bug: Fixes - -- [#3001](https://github.com/mochajs/mocha/pull/3001): Fix AMD-related failures first appearing in v3.5.1 ([@boneskull](https://github.com/boneskull)) - -# 3.5.1 / 2017-09-09 - -## :newspaper: News - -- :mega: Mocha is now sponsoring [PDXNode](http://pdxnode.org)! If you're in the [Portland](https://wikipedia.org/wiki/Portland,_Oregon) area, come check out the monthly talks and hack nights! - -## :bug: Fixes - -- [#2997](https://github.com/mochajs/mocha/pull/2997): Fix missing `xit` export for "require" interface ([@solodynamo](https://github.com/solodynamo)) -- [#2957](https://github.com/mochajs/mocha/pull/2957): Fix unicode character handling in XUnit reporter failures ([@jkrems](https://github.com/jkrems)) - -## :nut_and_bolt: Other - -- [#2986](https://github.com/mochajs/mocha/pull/2986): Add issue and PR templates ([@kungapal](https://github.com/kungapal)) -- [#2918](https://github.com/mochajs/mocha/pull/2918): Drop bash dependency for glob-related tests ([@ScottFreeCode](https://github.com/ScottFreeCode)) -- [#2922](https://github.com/mochajs/mocha/pull/2922): Improve `--compilers` coverage ([@ScottFreeCode](https://github.com/ScottFreeCode)) -- [#2981](https://github.com/mochajs/mocha/pull/2981): Fix tpyos and spelling errors ([@jsoref](https://github.com/jsoref)) - -# 3.5.0 / 2017-07-31 - -## :newspaper: News - -- Mocha now has a [code of conduct](https://github.com/mochajs/mocha/blob/master/.github/CODE_OF_CONDUCT.md) (thanks [@kungapal](https://github.com/kungapal)!). -- Old issues and PRs are now being marked "stale" by [Probot's "Stale" plugin](https://github.com/probot/stale). If an issue is marked as such, and you would like to see it remain open, simply add a new comment to the ticket or PR. -- **WARNING**: Support for non-ES5-compliant environments will be dropped starting with version 4.0.0 of Mocha! - -## :lock: Security Fixes - -- [#2860](https://github.com/mochajs/mocha/pull/2860): Address [CVE-2015-8315](https://nodesecurity.io/advisories/46) via upgrade of [debug](https://npm.im/debug) ([@boneskull](https://github.com/boneskull)) - -## :tada: Enhancements - -- [#2696](https://github.com/mochajs/mocha/pull/2696): Add `--forbid-only` and `--forbid-pending` flags. Use these in CI or hooks to ensure tests aren't accidentally being skipped! ([@charlierudolph](https://github.com/charlierudolph)) -- [#2813](https://github.com/mochajs/mocha/pull/2813): Support Node.js 8's `--napi-modules` flag ([@jupp0r](https://github.com/jupp0r)) - -## :nut_and_bolt: Other - -- Various CI-and-test-related fixes and improvements ([@boneskull](https://github.com/boneskull), [@dasilvacontin](https://github.com/dasilvacontin), [@PopradiArpad](https://github.com/PopradiArpad), [@Munter](https://github.com/munter), [@ScottFreeCode](https://github.com/ScottFreeCode)) -- "Officially" support Node.js 8 ([@elergy](https://github.com/elergy)) - -# 3.4.2 / 2017-05-24 - -## :bug: Fixes - -- [#2802](https://github.com/mochajs/mocha/issues/2802): Remove call to deprecated `os.tmpDir` ([@makepanic](https://github.com/makepanic)) -- [#2820](https://github.com/mochajs/mocha/pull/2820): Eagerly set `process.exitCode` ([@chrisleck](https://github.com/chrisleck)) - -## :nut_and_bolt: Other - -- [#2807](https://github.com/mochajs/mocha/pull/2807): Move linting into an npm script ([@Munter](https://github.com/munter)) - -# 3.4.1 / 2017-05-14 - -Fixed a publishing mishap with git's autocrlf settings. - -# 3.4.0 / 2017-05-14 - -Mocha is now moving to a quicker release schedule: when non-breaking changes are merged, a release should happen that week. - -This week's highlights: - -- `allowUncaught` added to commandline as `--allow-uncaught` (and bugfixed) -- warning-related Node flags - -## :tada: Enhancements - -- [#2793](https://github.com/mochajs/mocha/pull/2793), [#2697](https://github.com/mochajs/mocha/pull/2697): add --allowUncaught to Node.js ([@lrowe](https://github.com/lrowe)) -- [#2733](https://github.com/mochajs/mocha/pull/2733): Add `--no-warnings` and `--trace-warnings` flags ([@sonicdoe](https://github.com/sonicdoe)) - -## :bug: Fixes - -- [#2793](https://github.com/mochajs/mocha/pull/2793), [#2697](https://github.com/mochajs/mocha/pull/2697): fix broken allowUncaught ([@lrowe](https://github.com/lrowe)) - -## :nut_and_bolt: Other - -- [#2778](https://github.com/mochajs/mocha/pull/2778): Add license report and scan status ([@xizhao](https://github.com/xizhao)) -- [#2794](https://github.com/mochajs/mocha/pull/2794): no special case for macOS running Karma locally ([@boneskull](https://github.com/boneskull)) -- [#2795](https://github.com/mochajs/mocha/pull/2795): reverts use of semistandard directly ([#2648](https://github.com/mochajs/mocha/pull/2648)) ([@boneskull](https://github.com/boneskull)) - -# 3.3.0 / 2017-04-24 - -Thanks to all our contributors, maintainers, sponsors, and users! ❤️ - -As highlights: - -- We've got coverage now! -- Testing is looking less flaky \\o/. -- No more nitpicking about "mocha.js" build on PRs. - -## :tada: Enhancements - -- [#2659](https://github.com/mochajs/mocha/pull/2659): Adds support for loading reporter from an absolute or relative path ([@sul4bh](https://github.com/sul4bh)) -- [#2769](https://github.com/mochajs/mocha/pull/2769): Support `--inspect-brk` on command-line ([@igwejk](https://github.com/igwejk)) - -## :bug: Fixes - -- [#2662](https://github.com/mochajs/mocha/pull/2662): Replace unicode chars w/ hex codes in HTML reporter ([@rotemdan](https://github.com/rotemdan)) - -## :mag: Coverage - -- [#2672](https://github.com/mochajs/mocha/pull/2672): Add coverage for node tests ([@c089](https://github.com/c089), [@Munter](https://github.com/munter)) -- [#2680](https://github.com/mochajs/mocha/pull/2680): Increase tests coverage for base reporter ([@epallerols](https://github.com/epallerols)) -- [#2690](https://github.com/mochajs/mocha/pull/2690): Increase tests coverage for doc reporter ([@craigtaub](https://github.com/craigtaub)) -- [#2701](https://github.com/mochajs/mocha/pull/2701): Increase tests coverage for landing, min, tap and list reporters ([@craigtaub](https://github.com/craigtaub)) -- [#2691](https://github.com/mochajs/mocha/pull/2691): Increase tests coverage for spec + dot reporters ([@craigtaub](https://github.com/craigtaub)) -- [#2698](https://github.com/mochajs/mocha/pull/2698): Increase tests coverage for xunit reporter ([@craigtaub](https://github.com/craigtaub)) -- [#2699](https://github.com/mochajs/mocha/pull/2699): Increase tests coverage for json-stream, markdown and progress reporters ([@craigtaub](https://github.com/craigtaub)) -- [#2703](https://github.com/mochajs/mocha/pull/2703): Cover .some() function in utils.js with tests ([@seppevs](https://github.com/seppevs)) -- [#2773](https://github.com/mochajs/mocha/pull/2773): Add tests for loading reporters w/ relative/absolute paths ([@sul4bh](https://github.com/sul4bh)) - -## :nut_and_bolt: Other - -- Remove bin/.eslintrc; ensure execs are linted ([@boneskull](https://github.com/boneskull)) -- [#2542](https://github.com/mochajs/mocha/issues/2542): Expand CONTRIBUTING.md ([@boneskull](https://github.com/boneskull)) -- [#2660](https://github.com/mochajs/mocha/pull/2660): Double timeouts on integration tests ([@Munter](https://github.com/munter)) -- [#2653](https://github.com/mochajs/mocha/pull/2653): Update copyright year ([@Scottkao85], [@Munter](https://github.com/munter)) -- [#2621](https://github.com/mochajs/mocha/pull/2621): Update dependencies to enable Greenkeeper ([@boneskull](https://github.com/boneskull), [@greenkeeper](https://github.com/greenkeeper)) -- [#2625](https://github.com/mochajs/mocha/pull/2625): Use trusty container in travis-ci; use "artifacts" addon ([@boneskull](https://github.com/boneskull)) -- [#2670](https://github.com/mochajs/mocha/pull/2670): doc(CONTRIBUTING): fix link to org members ([@coderbyheart](https://github.com/coderbyheart)) -- Add Mocha propaganda to README.md ([@boneskull](https://github.com/boneskull)) -- [#2470](https://github.com/mochajs/mocha/pull/2470): Avoid test flake in "delay" test ([@boneskull](https://github.com/boneskull)) -- [#2675](https://github.com/mochajs/mocha/pull/2675): Limit browser concurrency on sauce ([@boneskull](https://github.com/boneskull)) -- [#2669](https://github.com/mochajs/mocha/pull/2669): Use temporary test-only build of mocha.js for browsers tests ([@Munter](https://github.com/munter)) -- Fix "projects" link in README.md ([@boneskull](https://github.com/boneskull)) -- [#2678](https://github.com/mochajs/mocha/pull/2678): Chore(Saucelabs): test on IE9, IE10 and IE11 ([@coderbyheart](https://github.com/coderbyheart)) -- [#2648](https://github.com/mochajs/mocha/pull/2648): Use `semistandard` directly ([@kt3k](https://github.com/kt3k)) -- [#2727](https://github.com/mochajs/mocha/pull/2727): Make the build reproducible ([@lamby](https://github.com/lamby)) - -# 3.2.0 / 2016-11-24 - -## :newspaper: News - -### Mocha is now a JS Foundation Project! - -Mocha is proud to have joined the [JS Foundation](https://js.foundation). For more information, [read the announcement](https://js.foundation/announcements/2016/10/17/Linux-Foundation-Unites-JavaScript-Community-Open-Web-Development/). - -### Contributor License Agreement - -Under the foundation, all contributors to Mocha must sign the [JS Foundation CLA](https://js.foundation/CLA/) before their code can be merged. When sending a PR--if you have not already signed the CLA--a friendly bot will ask you to do so. - -Mocha remains licensed under the [MIT license](https://github.com/mochajs/mocha/blob/master/LICENSE). - -## :bug: Bug Fix - -- [#2535](https://github.com/mochajs/mocha/issues/2535): Fix crash when `--watch` encounters broken symlinks ([@villesau](https://github.com/villesau)) -- [#2593](https://github.com/mochajs/mocha/pull/2593): Fix (old) regression; incorrect symbol shown in `list` reporter ([@Aldaviva](https://github.com/Aldaviva)) -- [#2584](https://github.com/mochajs/mocha/issues/2584): Fix potential error when running XUnit reporter ([@vobujs](https://github.com/vobujs)) - -## :tada: Enhancement - -- [#2294](https://github.com/mochajs/mocha/issues/2294): Improve timeout error messaging ([@jeversmann](https://github.com/jeversmann), [@boneskull](https://github.com/boneskull)) -- [#2520](https://github.com/mochajs/mocha/pull/2520): Add info about `--inspect` flag to CLI help ([@ughitsaaron](https://github.com/ughitsaaron)) - -## :nut_and_bolt: Other - -- [#2570](https://github.com/mochajs/mocha/issues/2570): Use [karma-mocha](https://npmjs.com/package/karma-mocha) proper ([@boneskull](https://github.com/boneskull)) -- Licenses updated to reflect new copyright, add link to license and browser matrix to `README.md` ([@boneskull](https://github.com/boneskull), [@ScottFreeCode](https://github.com/ScottFreeCode), [@dasilvacontin](https://github.com/dasilvacontin)) - -Thanks to all our contributors, sponsors and backers! Keep on the lookout for a public roadmap and new contribution guide coming soon. - -# 3.1.2 / 2016-10-10 - -## :bug: Bug Fix - -- [#2528](https://github.com/mochajs/mocha/issues/2528): Recovery gracefully if an `Error`'s `stack` property isn't writable ([@boneskull](https://github.com/boneskull)) - -# 3.1.1 / 2016-10-09 - -## :bug: Bug Fix - -- [#1417](https://github.com/mochajs/mocha/issues/1417): Don't report `done()` was called multiple times when it wasn't ([@frankleonrose](https://github.com/frankleonrose)) - -## :nut_and_bolt: Other - -- [#2490](https://github.com/mochajs/mocha/issues/2490): Lint with [semistandard](https://npmjs.com/package/semistandard) config ([@makepanic](https://github.com/makepanic)) -- [#2525](https://github.com/mochajs/mocha/issues/2525): Lint all `.js` files ([@boneskull](https://github.com/boneskull)) -- [#2524](https://github.com/mochajs/mocha/issues/2524): Provide workaround for developers unable to run browser tests on macOS Sierra ([@boneskull](https://github.com/boneskull)) - -# 3.1.0 / 2016-09-27 - -## :tada: Enhancement - -- [#2357](https://github.com/mochajs/mocha/issues/2357): Support `--inspect` on command-line ([@simov](https://github.com/simov)) -- [#2194](https://github.com/mochajs/mocha/issues/2194): Human-friendly error if no files are matched on command-line ([@Munter](https://github.com/munter)) -- [#1744](https://github.com/mochajs/mocha/issues/1744): Human-friendly error if a Suite has no callback (BDD/TDD only) ([@anton](https://github.com/anton)) - -## :bug: Bug Fix - -- [#2488](https://github.com/mochajs/mocha/issues/2488): Fix case in which _variables beginning with lowercase "D"_ may not have been reported properly as global leaks ([@JustATrick](https://github.com/JustATrick)) :laughing: -- [#2465](https://github.com/mochajs/mocha/issues/2465): Always halt execution in async function when `this.skip()` is called ([@boneskull](https://github.com/boneskull)) -- [#2445](https://github.com/mochajs/mocha/pull/2445): Exits with expected code 130 when `SIGINT` encountered; exit code can no longer rollover at 256 ([@Munter](https://github.com/munter)) -- [#2315](https://github.com/mochajs/mocha/issues/2315): Fix uncaught TypeError thrown from callback stack ([@1999](https://github.com/1999)) -- Fix broken `only()`/`skip()` in IE7/IE8 ([@boneskull](https://github.com/boneskull)) -- [#2502](https://github.com/mochajs/mocha/issues/2502): Fix broken stack trace filter on Node.js under Windows ([@boneskull](https://github.com/boneskull)) -- [#2496](https://github.com/mochajs/mocha/issues/2496): Fix diff output for objects instantiated with `String` constructor ([more](https://youtrack.jetbrains.com/issue/WEB-23383)) ([@boneskull](https://github.com/boneskull)) - -# 3.0.2 / 2016-08-08 - -## :bug: Bug Fix - -- [#2424](https://github.com/mochajs/mocha/issues/2424): Fix error loading Mocha via Require.js ([@boneskull](https://github.com/boneskull)) -- [#2417](https://github.com/mochajs/mocha/issues/2417): Fix execution of _deeply_ nested `describe.only()` suites ([@not-an-aardvark](https://github.com/not-an-aardvark)) -- Remove references to `json-cov` and `html-cov` reporters in CLI ([@boneskull](https://github.com/boneskull)) - -# 3.0.1 / 2016-08-03 - -## :bug: Bug Fix - -- [#2406](https://github.com/mochajs/mocha/issues/2406): Restore execution of nested `describe.only()` suites ([@not-an-aardvark](https://github.com/not-an-aardvark)) - -# 3.0.0 / 2016-07-31 - -## :boom: Breaking Changes - -- :warning: Due to the increasing difficulty of applying security patches made within its dependency tree, as well as looming incompatibilities with Node.js v7.0, **Mocha no longer supports Node.js v0.8**. - -- :warning: **Mocha may no longer be installed by versions of `npm` less than `1.4.0`.** Previously, this requirement only affected Mocha's development dependencies. In short, this allows Mocha to depend on packages which have dependencies fixed to major versions (`^`). - -- `.only()` is no longer "fuzzy", can be used multiple times, and generally just works like you think it should. :joy: - -- To avoid common bugs, when a test injects a callback function (suggesting asynchronous execution), calls it, _and_ returns a `Promise`, Mocha will now throw an exception: - - \```js - const assert = require('assert'); - - it('should complete this test', function (done) { - return new Promise(function (resolve) { - assert.ok(true); - resolve(); - }) - .then(done); - }); - \``` - - The above test will fail with `Error: Resolution method is overspecified. Specify a callback *or* return a Promise; not both.`. - -- When a test timeout value _greater than_ `2147483648` is specified in any context (`--timeout`, `mocha.setup()`, per-suite, per-test, etc.), the timeout will be _disabled_ and the test(s) will be allowed to run indefinitely. This is equivalent to specifying a timeout value of `0`. See [MDN](https://developer.mozilla.org/docs/Web/API/WindowTimers/setTimeout#Maximum_delay_value) for reasoning. - -- The `dot` reporter now uses more visually distinctive characters when indicating "pending" and "failed" tests. - -- Mocha no longer supports [component](https://www.npmjs.com/package/component). - -- The long-forsaken `HTMLCov` and `JSONCov` reporters--and any relationship to the "node-jscoverage" project--have been removed. - -- `spec` reporter now omits leading carriage returns (`\r`) in non-TTY environment. - -## :tada: Enhancements - -- [#808](https://github.com/mochajs/mocha/issues/808): Allow regular-expression-like strings in `--grep` and browser's `grep` querystring; enables flags such as `i` for case-insensitive matches and `u` for unicode. ([@a8m](https://github.com/a8m)) -- [#2000](https://github.com/mochajs/mocha/pull/2000): Use distinctive characters in `dot` reporter; `,` will denote a "pending" test and `!` will denote a "failing" test. ([@elliottcable](https://github.com/elliottcable)) -- [#1632](https://github.com/mochajs/mocha/issues/1632): Throw a useful exception when a suite or test lacks a title. ([@a8m](https://github.com/a8m)) -- [#1481](https://github.com/mochajs/mocha/issues/1481): Better `.only()` behavior. ([@a8m](https://github.com/a8m)) -- [#2334](https://github.com/mochajs/mocha/issues/2334): Allow `this.skip()` in async tests and hooks. ([@boneskull](https://github.com/boneskull)) -- [#1320](https://github.com/mochajs/mocha/pull/1320): Throw a useful exception when test resolution method is overspecified. ([@jugglinmike](https://github.com/jugglinmike)) -- [#2364](https://github.com/mochajs/mocha/pull/2364): Support `--preserve-symlinks`. ([@rosswarren](https://github.com/rosswarren)) - -## :bug: Bug Fixes - -- [#2259](https://github.com/mochajs/mocha/pull/2259): Restore ES3 compatibility. Specifically, support an environment lacking `Date.prototype.toISOString()`, `JSON`, or has a non-standard implementation of `JSON`. ([@ndhoule](https://github.com/ndhoule), [@boneskull](https://github.com/boneskull)) -- [#2286](https://github.com/mochajs/mocha/issues/2286): Fix `after()` failing to execute if test skipped using `this.skip()` in `beforeEach()`; no longer marks the entire suite as "pending". ([@dasilvacontin](https://github.com/dasilvacontin), [@boneskull](https://github.com/boneskull)) -- [#2208](https://github.com/mochajs/mocha/pull/2208): Fix function name display in `markdown` and `html` (browser) reporters. ([@ScottFreeCode](https://github.com/ScottFreeCode)) -- [#2299](https://github.com/mochajs/mocha/pull/2299): Fix progress bar in `html` (browser) reporter. ([@AviVahl](https://github.com/avivahl)) -- [#2307](https://github.com/mochajs/mocha/pull/2307): Fix `doc` reporter crashing when test fails. ([@jleyba](https://github.com/jleyba)) -- [#2323](https://github.com/mochajs/mocha/issues/2323): Ensure browser entry point (`browser-entry.js`) is published to npm (for use with bundlers). ([@boneskull](https://github.com/boneskull)) -- [#2310](https://github.com/mochajs/mocha/issues/2310): Ensure custom reporter with an absolute path works in Windows. ([@silentcloud](https://github.com/silentcloud)) -- [#2311](https://github.com/mochajs/mocha/issues/2311): Fix problem wherein calling `this.slow()` without a value would blast any previously set value. ([@boneskull](https://github.com/boneskull)) -- [#1813](https://github.com/mochajs/mocha/issues/1813): Ensure Mocha's own test suite will run in Windows. ([@tswaters](https://github.com/tswaters), [@TimothyGu](https://github.com/timothygu), [@boneskull](https://github.com/boneskull)) -- [#2317](https://github.com/mochajs/mocha/issues/2317): Ensure all interfaces are displayed in `--help` on CLI. ([@ScottFreeCode](https://github.com/ScottFreeCode)) -- [#1644](https://github.com/mochajs/mocha/issues/1644): Don't exhibit undefined behavior when calling `this.timeout()` with very large values ([@callumacrae](https://github.com/callumacrae), [@boneskull](https://github.com/boneskull)) -- [#2361](https://github.com/mochajs/mocha/pull/2361): Don't truncate name of thrown anonymous exception. ([@boneskull](https://github.com/boneskull)) -- [#2367](https://github.com/mochajs/mocha/pull/2367): Fix invalid CSS. ([@bensontrent](https://github.com/bensontrent)) -- [#2401](https://github.com/mochajs/mocha/pull/2401): Remove carriage return before each test line in spec reporter. ([@Munter](https://github.com/munter)) - -## :nut_and_bolt: Other - -- Upgrade production dependencies to address security advisories (and because now we can): `glob`, `commander`, `escape-string-regexp`, and `supports-color`. ([@boneskull](https://github.com/boneskull), [@RobLoach](https://github.com/robloach)) -- Add Windows to CI. ([@boneskull](https://github.com/boneskull), [@TimothyGu](https://github.com/timothygu)) -- Ensure appropriate `engines` field in `package.json`. ([@shinnn](https://github.com/shinnn), [@boneskull](https://github.com/boneskull)) -- [#2348](https://github.com/mochajs/mocha/issues/2348): Upgrade ESLint to v2 ([@anthony-redfox](https://github.com/anthony-redfox)) - -We :heart: our [backers and sponsors](https://opencollective.com/mochajs)! - -:shipit: - -# 2.5.3 / 2016-05-25 - -- [#2112](https://github.com/mochajs/mocha/pull/2112) - Fix HTML reporter regression causing duplicate error output ([@danielstjules](https://github.com/danielstjules) via [`6d24063`](https://github.com/mochajs/mocha/commit/6d24063)) -- [#2119](https://github.com/mochajs/mocha/pull/2119) - Make HTML reporter failure/passed links preventDefault to avoid SPA's hash navigation ([@jimenglish81](https://github.com/jimenglish81) via [`9e93efc`](https://github.com/mochajs/mocha/commit/9e93efc)) - -# 2.5.2 / 2016-05-24 - -- [#2178](https://github.com/mochajs/mocha/pull/2178) - Avoid double and triple xUnit XML escaping ([@graingert](https://github.com/graingert) via [`49b5ff1`](https://github.com/mochajs/mocha/commit/49b5ff1)) - -# 2.5.1 / 2016-05-23 - -- Fix [to-iso-string](https://npmjs.com/package/to-iso-string) dependency ([@boneskull](https://github.com/boneskull) via [`bd9450b`](https://github.com/mochajs/mocha/commit/bd9450b)) - -Thanks [**@entertainyou**](https://github.com/entertainyou), [**@SimenB**](https://github.com/SimenB), [**@just-paja**](https://github.com/just-paja) for the heads-up. - -# 2.5.0 / 2016-05-23 - -This has been awhile coming! We needed to feel confident that the next release wouldn't break browser compatibility (e.g. the last few patch releases). - -## Browser Tests in CI - -We now run unit tests against PhantomJS v1.x and an assortment of browsers on [SauceLabs](https://saucelabs.com), including: - -- Internet Explorer v8.0 -- Chrome (latest) -- Firefox (latest) -- Safari (latest) -- Microsoft Edge (latest) - -To accomplish this, we now run Mocha's unit tests (and a handful of integration tests) via [Karma](https://npmjs.com/package/karma) and a modified [karma-mocha](https://npmjs.com/package/karma-mocha). Along the way, we had to solve issue [#880](https://github.com/mochajs/mocha/issues/880) (apologies to [**@mderijcke**](https://github.com/mderijcke) and [**@sukima**](https://github.com/sukima) who had PRs addressing this), as well as replace most usages of [should](https://npmjs.com/package/should) with [expect.js](https://npmjs.com/package/expect.js) for IE8. - -Going forward, when sending PRs, your code will _only_ run against PhantomJS v1.x (and not hit SauceLabs) [because security](https://docs.travis-ci.com/user/pull-requests/#Security-Restrictions-when-testing-Pull-Requests). - -## Node.js 6.x - -Node.js 6.x "just worked" before, but now it's in the CI matrix, so it's "officially" supported. Mocha _still retains support_ for Node.js 0.8.x. - -## "Minor" Release - -You'll see mostly bug fixes below, but also a couple features--as such, it's a "minor" release. - -## TYVM - -Thanks to everyone who contributed, and our fabulous [sponsors and backers](https://opencollective.com/mochajs)! - -- [#2079](https://github.com/mochajs/mocha/issues/2079) - Add browser checks to CI; update [browserify](https://npmjs.com/package/browserify) to v13.0.0 ([@dasilvacontin](https://github.com/dasilvacontin), [@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull) via [`c04c1d7`](https://github.com/mochajs/mocha/commit/c04c1d7), [`0b1e9b3`](https://github.com/mochajs/mocha/commit/0b1e9b3), [`0dde0fa`](https://github.com/mochajs/mocha/commit/0dde0fa), [`f8a3d86`](https://github.com/mochajs/mocha/commit/f8a3d86), [`9e8cbaa`](https://github.com/mochajs/mocha/commit/9e8cbaa)) -- [#880](https://github.com/mochajs/mocha/issues/880) - Make Mocha browserifyable ([@boneskull](https://github.com/boneskull) via [`524862b`](https://github.com/mochajs/mocha/commit/524862b)) -- [#2121](https://github.com/mochajs/mocha/issues/2121) - Update [glob](https://npmjs.com/package/glob) to v3.2.11 ([@astorije](https://github.com/astorije) via [`7920fc4`](https://github.com/mochajs/mocha/commit/7920fc4)) -- [#2126](https://github.com/mochajs/mocha/issues/2126) - Fix dupe error messages in stack trace filter ([@Turbo87](https://github.com/Turbo87) via [`4301caa`](https://github.com/mochajs/mocha/commit/4301caa)) -- [#2109](https://github.com/mochajs/mocha/issues/2109) - Fix certain diffs when objects cannot be coerced into primitives ([@joshlory](https://github.com/joshlory) via [`61fbb7f`](https://github.com/mochajs/mocha/commit/61fbb7f)) -- [#1827](https://github.com/mochajs/mocha/pull/1827) - Fix TWBS/`mocha.css` collisions ([@irnc](https://github.com/irnc) via [`0543798`](https://github.com/mochajs/mocha/commit/0543798)) -- [#1760](https://github.com/mochajs/mocha/issues/1760), [#1936](https://github.com/mochajs/mocha/issues/1936) - Fix `this.skip()` in HTML reporter ([@mislav](https://github.com/mislav) via [`cb4248b`](https://github.com/mochajs/mocha/commit/cb4248b)) -- [#2115](https://github.com/mochajs/mocha/pull/2115) - Fix exceptions thrown from hooks in HTML reporter ([@danielstjules](https://github.com/danielstjules) via [`e290bc0`](https://github.com/mochajs/mocha/commit/e290bc0)) -- [#2089](https://github.com/mochajs/mocha/issues/2089) - Handle Symbol values in `util.stringify()` ([@ryym](https://github.com/ryym) via [`ea61d05`](https://github.com/mochajs/mocha/commit/ea61d05)) -- [#2097](https://github.com/mochajs/mocha/pull/2097) - Fix diff for objects overriding `Object.prototype.hasOwnProperty` ([@mantoni](https://github.com/mantoni) via [`b20fdfe`](https://github.com/mochajs/mocha/commit/b20fdfe)) -- [#2101](https://github.com/mochajs/mocha/pull/2101) - Properly handle non-string "messages" thrown from assertion libraries ([@jkimbo](https://github.com/jkimbo) via [`9c41051`](https://github.com/mochajs/mocha/commit/9c41051)) -- [#2124](https://github.com/mochajs/mocha/pull/2124) - Update [growl](https://npmjs.com/package/growl) ([@benjamine](https://github.com/benjamine) via [`9ae6a85`](https://github.com/mochajs/mocha/commit/9ae6a85)) -- [#2162](https://github.com/mochajs/mocha/pull/2162), [#2205](https://github.com/mochajs/mocha/pull/2205) - JSDoc fixes ([@OlegTsyba](https://github.com/OlegTsyba) via [`8031f20`](https://github.com/mochajs/mocha/commit/8031f20), [@ScottFreeCode](https://github.com/ScottFreeCode) via [`f83b1d9`](https://github.com/mochajs/mocha/commit/f83b1d9)) -- [#2132](https://github.com/mochajs/mocha/issues/2132) - Remove Growl-related cruft ([@julienw](https://github.com/julienw) via [`00d6469`](https://github.com/mochajs/mocha/commit/00d6469)) -- [#2172](https://github.com/mochajs/mocha/pull/2172) - Add [OpenCollective](https://opencollective.com) badge, sponsors & backers ([@xdamman](https://github.com/xdamman), [@boneskull](https://github.com/boneskull) via [`caee94f`](https://github.com/mochajs/mocha/commit/caee94f)) -- [#1841](https://github.com/mochajs/mocha/pull/1841) - Add new logo, banner assets ([@dasilvacontin](https://github.com/dasilvacontin) via [`00fd0e1`](https://github.com/mochajs/mocha/commit/00fd0e1)) -- [#2214](https://github.com/mochajs/mocha/pull/2214) - Update `README.md` header ([@dasilvacontin](https://github.com/dasilvacontin) via [`c0f9be2`](https://github.com/mochajs/mocha/commit/c0f9be2)) -- [#2236](https://github.com/mochajs/mocha/pull/2236) - Better checks for Node.js v0.8 compatibility in CI ([@dasilvacontin](https://github.com/dasilvacontin) via [`ba5637d`](https://github.com/mochajs/mocha/commit/ba5637d)) -- [#2239](https://github.com/mochajs/mocha/issues/2239) - Add Node.js v6.x to CI matrix ([@boneskull](https://github.com/boneskull) via [`3904da4`](https://github.com/mochajs/mocha/commit/3904da4)) - -# 2.4.5 / 2016-01-28 - -- [#2080](https://github.com/mochajs/mocha/issues/2080), [#2078](https://github.com/mochajs/mocha/issues/2078), [#2072](https://github.com/mochajs/mocha/pull/2072), [#2073](https://github.com/mochajs/mocha/pull/2073), [#1200](https://github.com/mochajs/mocha/issues/1200) - Revert changes to console colors in changeset [1192914](https://github.com/mochajs/mocha/commit/119291449cd03a11cdeda9e37cf718a69a012896) and subsequent related changes thereafter. Restores compatibility with IE8 & PhantomJS. See also [mantoni/mochify.js#129](https://github.com/mantoni/mochify.js/issues/129) and [openlayers/ol3#4746](https://github.com/openlayers/ol3/pull/4746) ([@boneskull](https://github.com/boneskull)) -- [#2082](https://github.com/mochajs/mocha/pull/2082) - Fix several test assertions ([@mislav](https://github.com/mislav)) - -# 2.4.4 / 2016-01-27 - -- [#2080](https://github.com/mochajs/mocha/issues/2080) - Fix broken RequireJS compatibility ([@boneskull](https://github.com/boneskull)) - -# 2.4.3 / 2016-01-27 - -- [#2078](https://github.com/mochajs/mocha/issues/2078) - Fix broken IE8 ([@boneskull](https://github.com/boneskull)) - -# 2.4.2 / 2016-01-26 - -- [#2053](https://github.com/mochajs/mocha/pull/2053) - Fix web worker compatibility ([@mislav](https://github.com/mislav)) -- [#2072](https://github.com/mochajs/mocha/pull/2072) - Fix Windows color output ([@thedark1337](https://github.com/thedark1337)) -- [#2073](https://github.com/mochajs/mocha/pull/2073) - Fix colors in `progress` and `landing` reporters ([@gyandeeps](https://github.com/gyandeeps)) - -# 2.4.1 / 2016-01-26 - -- [#2067](https://github.com/mochajs/mocha/pull/2067) - Fix HTML/doc reporter regressions ([@danielstjules](https://github.com/danielstjules)) - -# 2.4.0 / 2016-01-25 - -- [#1945](https://github.com/mochajs/mocha/pull/1945) - Correctly skip tests when skipping in suite's before() ([@ryanshawty](https://github.com/ryanshawty)) -- [#2056](https://github.com/mochajs/mocha/pull/2056) - chore(license): update license year to 2016 ([@pra85](https://github.com/pra85)) -- [#2048](https://github.com/mochajs/mocha/pull/2048) - Fix `this.skip` from spec with HTML reporter ([@mislav](https://github.com/mislav)) -- [#2033](https://github.com/mochajs/mocha/pull/2033) - Update tests for newer versions of should.js ([@tomhughes](https://github.com/tomhughes)) -- [#2037](https://github.com/mochajs/mocha/pull/2037) - Fix for memory leak caused by referenced to deferred test ([@bd82](https://github.com/bd82)) -- [#2038](https://github.com/mochajs/mocha/pull/2038) - Also run Travis-CI on node.js 4 & 5 ([@bd82](https://github.com/bd82)) -- [#2028](https://github.com/mochajs/mocha/pull/2028) - Remove reference to test before afterAll hook runs ([@stonelgh](https://github.com/stonelgh)) -- Bump mkdirp to 0.5.1 to support strict mode ([@danielstjules](https://github.com/danielstjules)) -- [#1977](https://github.com/mochajs/mocha/pull/1977) - safely stringify PhantomJS undefined value ([@ahamid](https://github.com/ahamid)) -- Add the ability to retry tests ([@@longlho]) -- [#1982](https://github.com/mochajs/mocha/pull/1982) - Enable --log-timer-events option [@Alaneor](https://github.com/Alaneor) -- Fix [#1980](https://github.com/mochajs/mocha/issues/1980): Load mocha.opts from bin/mocha and bin/\_mocha ([@danielstjules](https://github.com/danielstjules)) -- [#1976](https://github.com/mochajs/mocha/pull/1976) - Simplify function call ([@iclanzan](https://github.com/iclanzan)) -- [#1963](https://github.com/mochajs/mocha/pull/1963) - Add support --perf-basic-prof ([@robraux](https://github.com/robraux)) -- [#1981](https://github.com/mochajs/mocha/pull/1981) - Fix HTML reporter handling of done and exceptions ([@Standard8](https://github.com/Standard8)) -- [#1993](https://github.com/mochajs/mocha/pull/1993) - propagate "file" property for "exports" interface ([@segrey](https://github.com/segrey)) -- [#1999](https://github.com/mochajs/mocha/pull/1999) - Add support for strict mode ([@tmont](https://github.com/tmont)) -- [#2005](https://github.com/mochajs/mocha/pull/2005) - XUnit Reporter Writes to stdout, falls back to console.log ([@jonnyreeves](https://github.com/jonnyreeves)) -- [#2021](https://github.com/mochajs/mocha/pull/2021) - Fix non ES5 compliant regexp ([@zetaben](https://github.com/zetaben)) -- [#1965] - Don't double install BDD UI ([@cowboyd](https://github.com/cowboyd)) -- [#1995](https://github.com/mochajs/mocha/pull/1995) - Make sure the xunit output dir exists before writing to it ([@ianwremmel](https://github.com/ianwremmel)) -- Use chalk for the base reporter colors; closes [#1200](https://github.com/mochajs/mocha/issues/1200) ([@boneskull](https://github.com/boneskull)) -- Fix requiring custom interfaces ([@jgkim](https://github.com/jgkim)) -- [#1967](https://github.com/mochajs/mocha/pull/1967) Silence Bluebird js warnings ([@krisr](https://github.com/krisr)) - -# 2.3.4 / 2015-11-15 - -- Update debug dependency to 2.2.0 -- remove duplication of mocha.opts on process.argv -- Fix typo in test/reporters/nyan.js - -# 2.3.3 / 2015-09-19 - -- [#1875](https://github.com/mochajs/mocha/issues/1875) - Fix Markdown reporter exceeds maximum call stack size ([@danielstjules](https://github.com/danielstjules)) -- [#1864](https://github.com/mochajs/mocha/issues/1864) - Fix xunit missing output with --reporter-options output ([@danielstjules](https://github.com/danielstjules)) -- [#1846](https://github.com/mochajs/mocha/issues/1846) - Support all harmony flags ([@danielstjules](https://github.com/danielstjules)) -- Fix fragile xunit reporter spec ([@danielstjules](https://github.com/danielstjules)) -- [#1669](https://github.com/mochajs/mocha/issues/1669) - Fix catch uncaught errors outside test suite execution ([@danielstjules](https://github.com/danielstjules)) -- [#1868](https://github.com/mochajs/mocha/issues/1868) - Revert jade to support npm < v1.3.7 ([@danielstjules](https://github.com/danielstjules)) -- [#1766](https://github.com/mochajs/mocha/issues/1766) - Don't remove modules/components from stack trace in the browser ([@danielstjules](https://github.com/danielstjules)) -- [#1798](https://github.com/mochajs/mocha/issues/1798) - Fix correctly attribute mutiple done err with hooks ([@danielstjules](https://github.com/danielstjules)) -- Fix use utils.reduce for IE8 compatibility ([@wsw0108](https://github.com/wsw0108)) -- Some linting errors fixed by [@danielstjules](https://github.com/danielstjules) -- Call the inspect() function if message is not set ([@kevinburke](https://github.com/kevinburke)) - -# 2.3.2 / 2015-09-07 - -- [#1868](https://github.com/mochajs/mocha/issues/1868) - Fix compatibility with older versions of NPM ([@boneskull](https://github.com/boneskull)) - -# 2.3.1 / 2015-09-06 - -- [#1812](https://github.com/mochajs/mocha/issues/1812) - Fix: Bail flag causes before() hooks to be run even after a failure ([@aaroncrows]) - -# 2.3.0 / 2015-08-30 - -- [#553](https://github.com/mochajs/mocha/issues/553) - added --allowUncaught option ([@amsul](https://github.com/amsul)) -- [#1490](https://github.com/mochajs/mocha/issues/1490) - Allow --async-only to be satisfied by returning a promise ([@jlai](https://github.com/jlai)) -- [#1829](https://github.com/mochajs/mocha/issues/1829) - support --max-old-space-size ([@gigadude](https://github.com/gigadude)) -- [#1811](https://github.com/mochajs/mocha/issues/1811) - upgrade Jade dependency ([@outsideris](https://github.com/outsideris)) -- [#1769](https://github.com/mochajs/mocha/issues/1769) - Fix async hook error handling ([@ajaykodali](https://github.com/ajaykodali)) -- [#1230](https://github.com/mochajs/mocha/issues/1230) - More descriptive beforeEach/afterEach messages ([@duncanbeevers](https://github.com/duncanbeevers)) -- [#1787](https://github.com/mochajs/mocha/issues/1787) - Scope loading behaviour instead of using early return ([@aryeguy](https://github.com/aryeguy)) -- [#1789](https://github.com/mochajs/mocha/issues/1789) - Fix: html-runner crashing ([@sunesimonsen](https://github.com/sunesimonsen)) -- [#1749](https://github.com/mochajs/mocha/issues/1749) - Fix maximum call stack error on large amount of tests ([@tinganho](https://github.com/tinganho)) -- [#1230](https://github.com/mochajs/mocha/issues/1230) - Decorate failed hook titles with test title ([@duncanbeevers](https://github.com/duncanbeevers)) -- [#1260](https://github.com/mochajs/mocha/issues/1260) - Build using Browserify ([@ndhoule](https://github.com/ndhoule)) -- [#1728](https://github.com/mochajs/mocha/issues/1728) - Don't use `__proto__` ([@ndhoule](https://github.com/ndhoule)) -- [#1781](https://github.com/mochajs/mocha/issues/1781) - Fix hook error tests ([@glenjamin](https://github.com/glenjamin)) -- [#1754](https://github.com/mochajs/mocha/issues/1754) - Allow boolean --reporter-options ([@papandreou](https://github.com/papandreou)) -- [#1766](https://github.com/mochajs/mocha/issues/1766) - Fix overly aggressive stack suppression ([@moll](https://github.com/moll)) -- [#1752](https://github.com/mochajs/mocha/issues/1752) - Avoid potential infinite loop ([@gsilk](https://github.com/gsilk)) -- [#1761](https://github.com/mochajs/mocha/issues/1761) - Fix problems running under PhantomJS ([@chromakode](https://github.com/chromakode)) -- [#1700](https://github.com/mochajs/mocha/issues/1700) - Fix more problems running under PhantomJS ([@jbnicolai](https://github.com/jbnicolai)) -- [#1774](https://github.com/mochajs/mocha/issues/1774) - Support escaped spaces in CLI options ([@adamgruber](https://github.com/adamgruber)) -- [#1687](https://github.com/mochajs/mocha/issues/1687) - Fix HTML reporter links with special chars ([@benvinegar](https://github.com/benvinegar)) -- [#1359](https://github.com/mochajs/mocha/issues/1359) - Adopt code style and enforce it using ESLint ([@ndhoule](https://github.com/ndhoule) w/ assist from [@jbnicolai](https://github.com/jbnicolai) & [@boneskull](https://github.com/boneskull)) -- various refactors ([@jbnicolai](https://github.com/jbnicolai)) -- [#1758](https://github.com/mochajs/mocha/issues/1758) - Add cross-frame compatible Error checking ([@outdooricon](https://github.com/outdooricon)) -- [#1741](https://github.com/mochajs/mocha/issues/1741) - Remove moot `version` property from bower.json ([@kkirsche](https://github.com/kkirsche)) -- [#1739](https://github.com/mochajs/mocha/issues/1739) - Improve `HISTORY.md` ([@rstacruz](https://github.com/rstacruz)) -- [#1730](https://github.com/mochajs/mocha/issues/1730) - Support more io.js flags ([@ryedog](https://github.com/ryedog)) -- [#1349](https://github.com/mochajs/mocha/issues/1349) - Allow HTML in HTML reporter errors ([@papandreou](https://github.com/papandreou) / [@sunesimonsen](https://github.com/sunesimonsen)) -- [#1572](https://github.com/mochajs/mocha/issues/1572) - Prevent default browser behavior for failure/pass links ([@jschilli](https://github.com/jschilli)) -- [#1630](https://github.com/mochajs/mocha/issues/1630) - Support underscored harmony flags ([@dominicbarnes](https://github.com/dominicbarnes)) -- [#1718](https://github.com/mochajs/mocha/issues/1718) - Support more harmony flags ([@slyg](https://github.com/slyg)) -- [#1689](https://github.com/mochajs/mocha/issues/1689) - Add stack to JSON-stream reporter ([@jonathandelgado](https://github.com/jonathandelgado)) -- [#1654](https://github.com/mochajs/mocha/issues/1654) - Fix `ReferenceError` "location is not defined" ([@jakemmarsh](https://github.com/jakemmarsh)) - -# 2.2.5 / 2015-05-14 - -- [#1699](https://github.com/mochajs/mocha/issues/1699) - Upgrade jsdiff to v1.4.0 ([@nylen](https://github.com/nylen)) -- [#1648](https://github.com/mochajs/mocha/issues/1648) - fix diff background colors in the console ([@nylen](https://github.com/nylen)) -- [#1327](https://github.com/mochajs/mocha/issues/1327) - fix tests running twice, a regression issue. ([#1686](https://github.com/mochajs/mocha/issues/1686), [@danielstjules](https://github.com/danielstjules)) -- [#1675](https://github.com/mochajs/mocha/issues/1675) - add integration tests ([@danielstjules](https://github.com/danielstjules)) -- [#1682](https://github.com/mochajs/mocha/issues/1682) - use a valid SPDX license identifier in package.json ([@kemitchell](https://github.com/kemitchell)) -- [#1660](https://github.com/mochajs/mocha/issues/1660) - fix assertion of invalid dates ([#1661](https://github.com/mochajs/mocha/issues/1661), [@a8m](https://github.com/a8m)) -- [#1241](https://github.com/mochajs/mocha/issues/1241) - fix issue with multiline diffs appearing as single line ([#1655](https://github.com/mochajs/mocha/issues/1655), [@a8m](https://github.com/a8m)) - -# 2.2.4 / 2015-04-08 - -- Load mocha.opts in \_mocha for now (close [#1645](https://github.com/mochajs/mocha/issues/1645)) - -# 2.2.3 / 2015-04-07 - -- fix(reporter/base): string diff - issue [#1241](https://github.com/mochajs/mocha/issues/1241) -- fix(reporter/base): string diff - issue [#1241](https://github.com/mochajs/mocha/issues/1241) -- fix(reporter/base): don't show diffs for errors without expectation -- fix(reporter/base): don't assume error message is first line of stack -- improve: dry up reporter/base test -- fix(reporter/base): explicitly ignore showDiff [#1614](https://github.com/mochajs/mocha/issues/1614) -- Add iojs to travis build -- Pass `--allow-natives-syntax` flag to node. -- Support --harmony_classes flag for io.js -- Fix 1556: Update utils.clean to handle newlines in func declarations -- Fix 1606: fix err handling in IE <= 8 and non-ES5 browsers -- Fix 1585: make \_mocha executable again -- chore(package.json): add a8m as a contributor -- Fixed broken link on html-cov reporter -- support --es_staging flag -- fix issue where menu overlaps content. -- update contributors in package.json -- Remove trailing whitespace from reporter output -- Remove contributors list from readme -- log third-party reporter errors -- [Fix] Exclude not own properties when looping on options -- fix: support node args in mocha.opts (close [#1573](https://github.com/mochajs/mocha/issues/1573)) -- fix(reporter/base): string diff - issue [#1241](https://github.com/mochajs/mocha/issues/1241) - -# 2.2.1 / 2015-03-09 - -- Fix passing of args intended for node/iojs. - -# 2.2.0 / 2015-03-06 - -- Update mocha.js -- Add --fgrep. Use grep for RegExp, fgrep for str -- Ignore async global errors after spec resolution -- Fixing errors that prevent mocha.js from loading in the browser - fixes [#1558](https://github.com/mochajs/mocha/issues/1558) -- fix(utils): issue [#1558](https://github.com/mochajs/mocha/issues/1558) + make -- add ability to delay root suite; closes [#362](https://github.com/mochajs/mocha/issues/362), closes [#1124](https://github.com/mochajs/mocha/issues/1124) -- fix insanity in http tests -- update travis: add node 0.12, add gitter, remove slack -- building -- resolve [#1548](https://github.com/mochajs/mocha/issues/1548): ensure the environment's "node" executable is used -- reporters/base: use supports-color to detect colorable term -- travis: use docker containers -- small fix: commander option for --expose-gc -- Ignore asynchronous errors after global failure -- Improve error output when a test fails with a non-error -- updated travis badge, uses svg instead of img -- Allow skip from test context for [#332](https://github.com/mochajs/mocha/issues/332) -- [JSHINT] Unnecessary semicolon fixed in bin/\_mocha -- Added a reminder about the done() callback to test timeout error messages -- fixes [#1496](https://github.com/mochajs/mocha/issues/1496), in Mocha.run(fn), check if fn exists before executing it, added tests too -- Add Harmony Proxy flag for iojs -- test(utils|ms|\*): test existing units -- add support for some iojs flags -- fix(utils.stringify): issue [#1229](https://github.com/mochajs/mocha/issues/1229), diff viewer -- Remove slack link -- Prevent multiple 'grep=' querystring params in html reporter -- Use grep as regexp (close [#1381](https://github.com/mochajs/mocha/issues/1381)) -- utils.stringify should handle objects without an Object prototype -- in runnable test, comparing to undefined error's message rather than a literal -- Fix test running output truncation on async STDIO -- amended for deprecated customFds option in child_process - -# 2.1.0 / 2014-12-23 - -- showDiff: don’t stringify strings -- Clean up unused module dependencies. -- Filter zero-length strings from mocha.opts -- only write to stdout in reporters -- Revert "only write to stdout in reporters" -- Print colored output only to a tty -- update summary in README.md -- rename Readme.md/History.md to README.md/HISTORY.md because neurotic -- add .mailmap to fix "git shortlog" or "git summary" output -- fixes [#1461](https://github.com/mochajs/mocha/issues/1461): nyan-reporter now respects Base.useColors, fixed bug where Base.color would not return a string when str wasn't a string. -- Use existing test URL builder in failed replay links -- modify .travis.yml: use travis_retry; closes [#1449](https://github.com/mochajs/mocha/issues/1449) -- fix -t 0 behavior; closes [#1446](https://github.com/mochajs/mocha/issues/1446) -- fix tests (whoops) -- improve diff behavior -- Preserve pathname when linking to individual tests -- Fix test -- Tiny typo in comments fixed -- after hooks now being called on failed tests when using bail, fixes [#1093](https://github.com/mochajs/mocha/issues/1093) -- fix throwing undefined/null now makes tests fail, fixes [#1395](https://github.com/mochajs/mocha/issues/1395) -- compiler extensions are added as watched extensions, removed non-standard extensions from watch regex, resolves [#1221](https://github.com/mochajs/mocha/issues/1221) -- prefix/namespace for suite titles in markdown reporter, fixes [#554](https://github.com/mochajs/mocha/issues/554) -- fix more bad markdown in CONTRIBUTING.md -- fix bad markdown in CONTRIBUTING.md -- add setImmediate/clearImmediate to globals; closes [#1435](https://github.com/mochajs/mocha/issues/1435) -- Fix buffer diffs (closes [#1132](https://github.com/mochajs/mocha/issues/1132), closes [#1433](https://github.com/mochajs/mocha/issues/1433)) -- add a CONTRIBUTING.md. closes [#882](https://github.com/mochajs/mocha/issues/882) -- fix intermittent build failures (maybe). closes [#1407](https://github.com/mochajs/mocha/issues/1407) -- add Slack notification to .travis.yml -- Fix slack link -- Add slack room to readme -- Update maintainers -- update maintainers and contributors -- resolves [#1393](https://github.com/mochajs/mocha/issues/1393): kill children with more effort on SIGINT -- xunit reporter support for optionally writing to a file -- if a reporter has a .done method, call it before exiting -- add support for reporter options -- only write to stdout in reporters - -# 2.0.0 / 2014-10-21 - -- remove: support for node 0.6.x, 0.4.x -- fix: landing reporter with non ansi characters ([#211](https://github.com/mochajs/mocha/issues/211)) -- fix: html reporter - preserve query params when navigating to suites/tests ([#1358](https://github.com/mochajs/mocha/issues/1358)) -- fix: json stream reporter add error message to failed test -- fix: fixes for visionmedia -> mochajs -- fix: use stdio, fixes node deprecation warnings ([#1391](https://github.com/mochajs/mocha/issues/1391)) - -# 1.21.5 / 2014-10-11 - -- fix: build for NodeJS v0.6.x -- fix: do not attempt to highlight syntax when non-HTML reporter is used -- update: escape-string-regexp to 1.0.2. -- fix: botched indentation in canonicalize() -- fix: .gitignore: ignore .patch and .diff files -- fix: changed 'Catched' to 'Caught' in uncaught exception error handler messages -- add: `pending` field for json reporter -- fix: Runner.prototype.uncaught: don't double-end runnables that already have a state. -- fix: --recursive, broken by [`f0facd2`](https://github.com/mochajs/mocha/commit/f0facd2e) -- update: replaces escapeRegexp with the escape-string-regexp package. -- update: commander to 2.3.0. -- update: diff to 1.0.8. -- fix: ability to disable syntax highlighting ([#1329](https://github.com/mochajs/mocha/issues/1329)) -- fix: added empty object to errorJSON() call to catch when no error is present -- fix: never time out after calling enableTimeouts(false) -- fix: timeout(0) will work at suite level ([#1300](https://github.com/mochajs/mocha/issues/1300)) -- Fix for --watch+only() issue ([#888](https://github.com/mochajs/mocha/issues/888) ) -- fix: respect err.showDiff, add Base reporter test ([#810](https://github.com/mochajs/mocha/issues/810)) - -# 1.22.1-3 / 2014-07-27 - -- fix: disabling timeouts with this.timeout(0) ([#1301](https://github.com/mochajs/mocha/issues/1301)) - -# 1.22.1-3 / 2014-07-27 - -- fix: local uis and reporters ([#1288](https://github.com/mochajs/mocha/issues/1288)) -- fix: building 1.21.0's changes in the browser ([#1284](https://github.com/mochajs/mocha/issues/1284)) - -# 1.21.0 / 2014-07-23 - -- add: --no-timeouts option ([#1262](https://github.com/mochajs/mocha/issues/1262), [#1268](https://github.com/mochajs/mocha/issues/1268)) -- add: --\*- deprecation node flags ([#1217](https://github.com/mochajs/mocha/issues/1217)) -- add: --watch-extensions argument ([#1247](https://github.com/mochajs/mocha/issues/1247)) -- change: spec reporter is default ([#1228](https://github.com/mochajs/mocha/issues/1228)) -- fix: diff output showing incorrect +/- ([#1182](https://github.com/mochajs/mocha/issues/1182)) -- fix: diffs of circular structures ([#1179](https://github.com/mochajs/mocha/issues/1179)) -- fix: re-render the progress bar when progress has changed only ([#1151](https://github.com/mochajs/mocha/issues/1151)) -- fix support for environments with global and window ([#1159](https://github.com/mochajs/mocha/issues/1159)) -- fix: reverting to previously defined onerror handler ([#1178](https://github.com/mochajs/mocha/issues/1178)) -- fix: stringify non error objects passed to done() ([#1270](https://github.com/mochajs/mocha/issues/1270)) -- fix: using local ui, reporters ([#1267](https://github.com/mochajs/mocha/issues/1267)) -- fix: cleaning es6 arrows ([#1176](https://github.com/mochajs/mocha/issues/1176)) -- fix: don't include attrs in failure tag for xunit ([#1244](https://github.com/mochajs/mocha/issues/1244)) -- fix: fail tests that return a promise if promise is rejected w/o a reason ([#1224](https://github.com/mochajs/mocha/issues/1224)) -- fix: showing failed tests in doc reporter ([#1117](https://github.com/mochajs/mocha/issues/1117)) -- fix: dot reporter dots being off ([#1204](https://github.com/mochajs/mocha/issues/1204)) -- fix: catch empty throws ([#1219](https://github.com/mochajs/mocha/issues/1219)) -- fix: honoring timeout for sync operations ([#1242](https://github.com/mochajs/mocha/issues/1242)) -- update: growl to 1.8.0 - -# 1.20.1 / 2014-06-03 - -- update: should dev dependency to ~4.0.0 ([#1231](https://github.com/mochajs/mocha/issues/1231)) - -# 1.20.0 / 2014-05-28 - -- add: filenames to suite objects ([#1222](https://github.com/mochajs/mocha/issues/1222)) - -# 1.19.0 / 2014-05-17 - -- add: browser script option to package.json -- add: export file in Mocha.Test objects ([#1174](https://github.com/mochajs/mocha/issues/1174)) -- add: add docs for wrapped node flags -- fix: mocha.run() to return error status in browser ([#1216](https://github.com/mochajs/mocha/issues/1216)) -- fix: clean() to show failure details ([#1205](https://github.com/mochajs/mocha/issues/1205)) -- fix: regex that generates html for new keyword ([#1201](https://github.com/mochajs/mocha/issues/1201)) -- fix: sibling suites have inherited but separate contexts ([#1164](https://github.com/mochajs/mocha/issues/1164)) - -# 1.18.2 / 2014-03-18 - -- fix: html runner was prevented from using #mocha as the default root el ([#1162](https://github.com/mochajs/mocha/issues/1162)) - -# 1.18.1 / 2014-03-18 - -- fix: named before/after hooks in bdd, tdd, qunit interfaces ([#1161](https://github.com/mochajs/mocha/issues/1161)) - -# 1.18.0 / 2014-03-13 - -- add: promise support ([#329](https://github.com/mochajs/mocha/issues/329)) -- add: named before/after hooks ([#966](https://github.com/mochajs/mocha/issues/966)) - -# 1.17.1 / 2014-01-22 - -- fix: expected messages in should.js (should.js#168) -- fix: expect errno global in node versions < v0.9.11 ([#1111](https://github.com/mochajs/mocha/issues/1111)) -- fix: unreliable checkGlobals optimization ([#1110](https://github.com/mochajs/mocha/issues/1110)) - -# 1.17.0 / 2014-01-09 - -- add: able to require globals (describe, it, etc.) through mocha ([#1077](https://github.com/mochajs/mocha/issues/1077)) -- fix: abort previous run on --watch change ([#1100](https://github.com/mochajs/mocha/issues/1100)) -- fix: reset context for each --watch triggered run ([#1099](https://github.com/mochajs/mocha/issues/1099)) -- fix: error when cli can't resolve path or pattern ([#799](https://github.com/mochajs/mocha/issues/799)) -- fix: canonicalize objects before stringifying and diffing them ([#1079](https://github.com/mochajs/mocha/issues/1079)) -- fix: make CR call behave like carriage return for non tty ([#1087](https://github.com/mochajs/mocha/issues/1087)) - -# 1.16.2 / 2013-12-23 - -- fix: couple issues with ie 8 ([#1082](https://github.com/mochajs/mocha/issues/1082), [#1081](https://github.com/mochajs/mocha/issues/1081)) -- fix: issue running the xunit reporter in browsers ([#1068](https://github.com/mochajs/mocha/issues/1068)) -- fix: issue with firefox < 3.5 ([#725](https://github.com/mochajs/mocha/issues/725)) - -# 1.16.1 / 2013-12-19 - -- fix: recompiled for missed changes from the last release - -# 1.16.0 / 2013-12-19 - -- add: Runnable.globals(arr) for per test global whitelist ([#1046](https://github.com/mochajs/mocha/issues/1046)) -- add: mocha.throwError(err) for assertion libs to call ([#985](https://github.com/mochajs/mocha/issues/985)) -- remove: --watch's spinner ([#806](https://github.com/mochajs/mocha/issues/806)) -- fix: duplicate test output for multi-line specs in spec reporter ([#1006](https://github.com/mochajs/mocha/issues/1006)) -- fix: gracefully exit on SIGINT ([#1063](https://github.com/mochajs/mocha/issues/1063)) -- fix expose the specified ui only in the browser ([#984](https://github.com/mochajs/mocha/issues/984)) -- fix: ensure process exit code is preserved when using --no-exit ([#1059](https://github.com/mochajs/mocha/issues/1059)) -- fix: return true from window.onerror handler ([#868](https://github.com/mochajs/mocha/issues/868)) -- fix: xunit reporter to use process.stdout.write ([#1068](https://github.com/mochajs/mocha/issues/1068)) -- fix: utils.clean(str) indentation ([#761](https://github.com/mochajs/mocha/issues/761)) -- fix: xunit reporter returning test duration a NaN ([#1039](https://github.com/mochajs/mocha/issues/1039)) - -# 1.15.1 / 2013-12-03 - -- fix: recompiled for missed changes from the last release - -# 1.15.0 / 2013-12-02 - -- add: `--no-exit` to prevent `process.exit()` ([#1018](https://github.com/mochajs/mocha/issues/1018)) -- fix: using inline diffs ([#1044](https://github.com/mochajs/mocha/issues/1044)) -- fix: show pending test details in xunit reporter ([#1051](https://github.com/mochajs/mocha/issues/1051)) -- fix: faster global leak detection ([#1024](https://github.com/mochajs/mocha/issues/1024)) -- fix: yui compression ([#1035](https://github.com/mochajs/mocha/issues/1035)) -- fix: wrapping long lines in test results ([#1030](https://github.com/mochajs/mocha/issues/1030), [#1031](https://github.com/mochajs/mocha/issues/1031)) -- fix: handle errors in hooks ([#1043](https://github.com/mochajs/mocha/issues/1043)) - -# 1.14.0 / 2013-11-02 - -- add: unified diff ([#862](https://github.com/mochajs/mocha/issues/862)) -- add: set MOCHA_COLORS env var to use colors ([#965](https://github.com/mochajs/mocha/issues/965)) -- add: able to override tests links in html reporters ([#776](https://github.com/mochajs/mocha/issues/776)) -- remove: teamcity reporter ([#954](https://github.com/mochajs/mocha/issues/954)) -- update: commander dependency to 2.0.0 ([#1010](https://github.com/mochajs/mocha/issues/1010)) -- fix: mocha --ui will try to require the ui if not built in, as --reporter does ([#1022](https://github.com/mochajs/mocha/issues/1022)) -- fix: send cursor commands only if isatty ([#184](https://github.com/mochajs/mocha/issues/184), [#1003](https://github.com/mochajs/mocha/issues/1003)) -- fix: include assertion message in base reporter ([#993](https://github.com/mochajs/mocha/issues/993), [#991](https://github.com/mochajs/mocha/issues/991)) -- fix: consistent return of it, it.only, and describe, describe.only ([#840](https://github.com/mochajs/mocha/issues/840)) - -# 1.13.0 / 2013-09-15 - -- add: sort test files with --sort ([#813](https://github.com/mochajs/mocha/issues/813)) -- update: diff dependency to 1.0.7 -- update: glob dependency to 3.2.3 ([#927](https://github.com/mochajs/mocha/issues/927)) -- fix: diffs show whitespace differences ([#976](https://github.com/mochajs/mocha/issues/976)) -- fix: improve global leaks ([#783](https://github.com/mochajs/mocha/issues/783)) -- fix: firefox window.getInterface leak -- fix: accessing iframe via window[iframeIndex] leak -- fix: faster global leak checking -- fix: reporter pending css selector ([#970](https://github.com/mochajs/mocha/issues/970)) - -# 1.12.1 / 2013-08-29 - -- remove test.js from .gitignore -- update included version of ms.js - -# 1.12.0 / 2013-07-01 - -- add: prevent diffs for differing types. Closes [#900](https://github.com/mochajs/mocha/issues/900) -- add `Mocha.process` hack for phantomjs -- fix: use compilers with requires -- fix regexps in diffs. Closes [#890](https://github.com/mochajs/mocha/issues/890) -- fix xunit NaN on failure. Closes [#894](https://github.com/mochajs/mocha/issues/894) -- fix: strip tab indentation in `clean` utility method -- fix: textmate bundle installation - -# 1.11.0 / 2013-06-12 - -- add --prof support -- add --harmony support -- add --harmony-generators support -- add "Uncaught " prefix to uncaught exceptions -- add web workers support -- add `suite.skip()` -- change to output # of pending / passing even on failures. Closes [#872](https://github.com/mochajs/mocha/issues/872) -- fix: prevent hooks from being called if we are bailing -- fix `this.timeout(0)` - -# 1.10.0 / 2013-05-21 - -- add add better globbing support for windows via `glob` module -- add support to pass through flags such as --debug-brk=1234. Closes [#852](https://github.com/mochajs/mocha/issues/852) -- add test.only, test.skip to qunit interface -- change to always use word-based diffs for now. Closes [#733](https://github.com/mochajs/mocha/issues/733) -- change `mocha init` tests.html to index.html -- fix `process` global leak in the browser -- fix: use resolve() instead of join() for --require -- fix: filterLeaks() condition to not consider indices in global object as leaks -- fix: restrict mocha.css styling to #mocha id -- fix: save timer references to avoid Sinon interfering in the browser build. - -# 1.9.0 / 2013-04-03 - -- add improved setImmediate implementation -- replace --ignore-leaks with --check-leaks -- change default of ignoreLeaks to true. Closes [#791](https://github.com/mochajs/mocha/issues/791) -- remove scrolling for HTML reporter -- fix retina support -- fix tmbundle, restrict to js scope - -# 1.8.2 / 2013-03-11 - -- add `setImmediate` support for 0.10.x -- fix mocha -w spinner on windows - -# 1.8.1 / 2013-01-09 - -- fix .bail() arity check causing it to default to true - -# 1.8.0 / 2013-01-08 - -- add Mocha() options bail support -- add `Mocha#bail()` method -- add instanceof check back for inheriting from Error -- add component.json -- add diff.js to browser build -- update growl -- fix TAP reporter failures comment :D - -# 1.7.4 / 2012-12-06 - -- add total number of passes and failures to TAP -- remove .bind() calls. re [#680](https://github.com/mochajs/mocha/issues/680) -- fix indexOf. Closes [#680](https://github.com/mochajs/mocha/issues/680) - -# 1.7.3 / 2012-11-30 - -- fix uncaught error support for the browser -- revert uncaught "fix" which breaks node - -# 1.7.2 / 2012-11-28 - -- fix uncaught errors to expose the original error message - -# 1.7.0 / 2012-11-07 - -- add `--async-only` support to prevent false positives for missing `done()` -- add sorting by filename in code coverage -- add HTML 5 doctype to browser template. -- add play button to html reporter to rerun a single test -- add `this.timeout(ms)` as Suite#timeout(ms). Closes [#599](https://github.com/mochajs/mocha/issues/599) -- update growl dependency to 1.6.x -- fix encoding of test-case ?grep. Closes [#637](https://github.com/mochajs/mocha/issues/637) -- fix unicode chars on windows -- fix dom globals in Opera/IE. Closes [#243](https://github.com/mochajs/mocha/issues/243) -- fix markdown reporter a tags -- fix `this.timeout("5s")` support - -# 1.6.0 / 2012-10-02 - -- add object diffs when `err.showDiff` is present -- add hiding of empty suites when pass/failures are toggled -- add faster `.length` checks to `checkGlobals()` before performing the filter - -# 1.5.0 / 2012-09-21 - -- add `ms()` to `.slow()` and `.timeout()` -- add `Mocha#checkLeaks()` to re-enable global leak checks -- add `this.slow()` option [aheckmann] -- add tab, CR, LF to error diffs for now -- add faster `.checkGlobals()` solution [guille] -- remove `fn.call()` from reduce util -- remove `fn.call()` from filter util -- fix forEach. Closes [#582](https://github.com/mochajs/mocha/issues/582) -- fix relaying of signals [TooTallNate] -- fix TAP reporter grep number - -# 1.4.2 / 2012-09-01 - -- add support to multiple `Mocha#globals()` calls, and strings -- add `mocha.reporter()` constructor support [jfirebaugh] -- add `mocha.timeout()` -- move query-string parser to utils.js -- move highlight code to utils.js -- fix third-party reporter support [exogen] -- fix client-side API to match node-side [jfirebaugh] -- fix mocha in iframe [joliss] - -# 1.4.1 / 2012-08-28 - -- add missing `Markdown` export -- fix `Mocha#grep()`, escape regexp strings -- fix reference error when `devicePixelRatio` is not defined. Closes [#549](https://github.com/mochajs/mocha/issues/549) - -# 1.4.0 / 2012-08-22 - -- add mkdir -p to `mocha init`. Closes [#539](https://github.com/mochajs/mocha/issues/539) -- add `.only()`. Closes [#524](https://github.com/mochajs/mocha/issues/524) -- add `.skip()`. Closes [#524](https://github.com/mochajs/mocha/issues/524) -- change str.trim() to use utils.trim(). Closes [#533](https://github.com/mochajs/mocha/issues/533) -- fix HTML progress indicator retina display -- fix url-encoding of click-to-grep HTML functionality - -# 1.3.2 / 2012-08-01 - -- fix exports double-execution regression. Closes [#531](https://github.com/mochajs/mocha/issues/531) - -# 1.3.1 / 2012-08-01 - -- add passes/failures toggling to HTML reporter -- add pending state to `xit()` and `xdescribe()` [Brian Moore] -- add the [**@charset**](https://github.com/charset) "UTF-8"; to fix [#522](https://github.com/mochajs/mocha/issues/522) with FireFox. [Jonathan Creamer] -- add border-bottom to #stats links -- add check for runnable in `Runner#uncaught()`. Closes [#494](https://github.com/mochajs/mocha/issues/494) -- add 0.4 and 0.6 back to travis.yml -- add `-E, --growl-errors` to growl on failures only -- add prefixes to debug() names. Closes [#497](https://github.com/mochajs/mocha/issues/497) -- add `Mocha#invert()` to js api -- change dot reporter to use sexy unicode dots -- fix error when clicking pending test in HTML reporter -- fix `make tm` - -# 1.3.0 / 2012-07-05 - -- add window scrolling to `HTML` reporter -- add v8 `--trace-*` option support -- add support for custom reports via `--reporter MODULE` -- add `--invert` switch to invert `--grep` matches -- fix export of `Nyan` reporter. Closes [#495](https://github.com/mochajs/mocha/issues/495) -- fix escaping of `HTML` suite titles. Closes [#486](https://github.com/mochajs/mocha/issues/486) -- fix `done()` called multiple times with an error test -- change `--grep` - regexp escape the input - -# 1.2.2 / 2012-06-28 - -- Added 0.8.0 support - -# 1.2.1 / 2012-06-25 - -- Added `this.test.error(err)` support to after each hooks. Closes [#287](https://github.com/mochajs/mocha/issues/287) -- Added: export top-level suite on global mocha object (mocha.suite). Closes [#448](https://github.com/mochajs/mocha/issues/448) -- Fixed `js` code block format error in markdown reporter -- Fixed deprecation warning when using `path.existsSync` -- Fixed --globals with wildcard -- Fixed chars in nyan when his head moves back -- Remove `--growl` from test/mocha.opts. Closes [#289](https://github.com/mochajs/mocha/issues/289) - -# 1.2.0 / 2012-06-17 - -- Added `nyan` reporter [Atsuya Takagi] -- Added `mocha init ` to copy client files -- Added "specify" synonym for "it" [domenic] -- Added global leak wildcard support [nathanbowser] -- Fixed runner emitter leak. closes [#432](https://github.com/mochajs/mocha/issues/432) -- Fixed omission of .js extension. Closes [#454](https://github.com/mochajs/mocha/issues/454) - -# 1.1.0 / 2012-05-30 - -- Added: check each `mocha(1)` arg for directories to walk -- Added `--recursive` [tricknotes] -- Added `context` for BDD [hokaccha] -- Added styling for new clickable titles -- Added clickable suite titles to HTML reporter -- Added warning when strings are thrown as errors -- Changed: green arrows again in HTML reporter styling -- Changed ul/li elements instead of divs for better copy-and-pasting [joliss] -- Fixed issue [#325](https://github.com/mochajs/mocha/issues/325) - add better grep support to js api -- Fixed: save timer references to avoid Sinon interfering. - -# 1.0.3 / 2012-04-30 - -- Fixed string diff newlines -- Fixed: removed mocha.css target. Closes [#401](https://github.com/mochajs/mocha/issues/401) - -# 1.0.2 / 2012-04-25 - -- Added HTML reporter duration. Closes [#47](https://github.com/mochajs/mocha/issues/47) -- Fixed: one postMessage event listener [exogen] -- Fixed: allow --globals to be used multiple times. Closes [#100](https://github.com/mochajs/mocha/issues/100) [brendannee] -- Fixed [#158](https://github.com/mochajs/mocha/issues/158): removes jquery include from browser tests -- Fixed grep. Closes [#372](https://github.com/mochajs/mocha/issues/372) [brendannee] -- Fixed [#166](https://github.com/mochajs/mocha/issues/166) - When grepping don't display the empty suites -- Removed test/browser/style.css. Closes [#385](https://github.com/mochajs/mocha/issues/385) - -# 1.0.1 / 2012-04-04 - -- Fixed `.timeout()` in hooks -- Fixed: allow callback for `mocha.run()` in client version -- Fixed browser hook error display. Closes [#361](https://github.com/mochajs/mocha/issues/361) - -# 1.0.0 / 2012-03-24 - -- Added js API. Closes [#265](https://github.com/mochajs/mocha/issues/265) -- Added: initial run of tests with `--watch`. Closes [#345](https://github.com/mochajs/mocha/issues/345) -- Added: mark `location` as a global on the CS. Closes [#311](https://github.com/mochajs/mocha/issues/311) -- Added `markdown` reporter (github flavour) -- Added: scrolling menu to coverage.html. Closes [#335](https://github.com/mochajs/mocha/issues/335) -- Added source line to html report for Safari [Tyson Tate] -- Added "min" reporter, useful for `--watch` [Jakub Nešetřil] -- Added support for arbitrary compilers via . Closes [#338](https://github.com/mochajs/mocha/issues/338) [Ian Young] -- Added Teamcity export to lib/reporters/index [Michael Riley] -- Fixed chopping of first char in error reporting. Closes [#334](https://github.com/mochajs/mocha/issues/334) [reported by topfunky] -- Fixed terrible FF / Opera stack traces - -# 0.14.1 / 2012-03-06 - -- Added lib-cov to _.npmignore_ -- Added reporter to `mocha.run([reporter])` as argument -- Added some margin-top to the HTML reporter -- Removed jQuery dependency -- Fixed `--watch`: purge require cache. Closes [#266](https://github.com/mochajs/mocha/issues/266) - -# 0.14.0 / 2012-03-01 - -- Added string diff support for terminal reporters - -# 0.13.0 / 2012-02-23 - -- Added preliminary test coverage support. Closes [#5](https://github.com/mochajs/mocha/issues/5) -- Added `HTMLCov` reporter -- Added `JSONCov` reporter [kunklejr] -- Added `xdescribe()` and `xit()` to the BDD interface. Closes [#263](https://github.com/mochajs/mocha/issues/263) (docs \* Changed: make json reporter output pretty json -- Fixed node-inspector support, swapped `--debug` for `debug` to match node. Closes [#247](https://github.com/mochajs/mocha/issues/247) - -# 0.12.1 / 2012-02-14 - -- Added `npm docs mocha` support [TooTallNate] -- Added a `Context` object used for hook and test-case this. Closes [#253](https://github.com/mochajs/mocha/issues/253) -- Fixed `Suite#clone()` `.ctx` reference. Closes [#262](https://github.com/mochajs/mocha/issues/262) - -# 0.12.0 / 2012-02-02 - -- Added .coffee `--watch` support. Closes [#242](https://github.com/mochajs/mocha/issues/242) -- Added support to `--require` files relative to the CWD. Closes [#241](https://github.com/mochajs/mocha/issues/241) -- Added quick n dirty syntax highlighting. Closes [#248](https://github.com/mochajs/mocha/issues/248) -- Changed: made HTML progress indicator smaller -- Fixed xunit errors attribute [dhendo] - -# 0.10.2 / 2012-01-21 - -- Fixed suite count in reporter stats. Closes [#222](https://github.com/mochajs/mocha/issues/222) -- Fixed `done()` after timeout error reporting [Phil Sung] -- Changed the 0-based errors to 1 - -# 0.10.1 / 2012-01-17 - -- Added support for node 0.7.x -- Fixed absolute path support. Closes [#215](https://github.com/mochajs/mocha/issues/215) [kompiro] -- Fixed `--no-colors` option [Jussi Virtanen] -- Fixed Arial CSS typo in the correct file - -# 0.10.0 / 2012-01-13 - -- Added `-b, --bail` to exit on first exception [guillermo] -- Added support for `-gc` / `--expose-gc` [TooTallNate] -- Added `qunit`-inspired interface -- Added MIT LICENSE. Closes [#194](https://github.com/mochajs/mocha/issues/194) -- Added: `--watch` all .js in the CWD. Closes [#139](https://github.com/mochajs/mocha/issues/139) -- Fixed `self.test` reference in runner. Closes [#189](https://github.com/mochajs/mocha/issues/189) -- Fixed double reporting of uncaught exceptions after timeout. Closes [#195](https://github.com/mochajs/mocha/issues/195) - -# 0.8.2 / 2012-01-05 - -- Added test-case context support. Closes [#113](https://github.com/mochajs/mocha/issues/113) -- Fixed exit status. Closes [#187](https://github.com/mochajs/mocha/issues/187) -- Update commander. Closes [#190](https://github.com/mochajs/mocha/issues/190) - -# 0.8.1 / 2011-12-30 - -- Fixed reporting of uncaught exceptions. Closes [#183](https://github.com/mochajs/mocha/issues/183) -- Fixed error message defaulting [indutny] -- Changed mocha(1) from bash to node for windows [Nathan Rajlich] - -# 0.8.0 / 2011-12-28 - -- Added `XUnit` reporter [FeeFighters/visionmedia] -- Added `say(1)` notification support [Maciej Małecki] -- Changed: fail when done() is invoked with a non-Error. Closes [#171](https://github.com/mochajs/mocha/issues/171) -- Fixed `err.stack`, defaulting to message. Closes [#180](https://github.com/mochajs/mocha/issues/180) -- Fixed: `make tm` mkdir -p the dest. Closes [#137](https://github.com/mochajs/mocha/issues/137) -- Fixed mocha(1) --help bin name -- Fixed `-d` for `--debug` support - -# 0.7.1 / 2011-12-22 - -- Removed `mocha-debug(1)`, use `mocha --debug` -- Fixed CWD relative requires -- Fixed growl issue on windows [Raynos] -- Fixed: platform specific line endings [TooTallNate] -- Fixed: escape strings in HTML reporter. Closes [#164](https://github.com/mochajs/mocha/issues/164) - -# 0.7.0 / 2011-12-18 - -- Added support for IE{7,8} [guille] -- Changed: better browser nextTick implementation [guille] - -# 0.6.0 / 2011-12-18 - -- Added setZeroTimeout timeout for browser (nicer stack traces). Closes [#153](https://github.com/mochajs/mocha/issues/153) -- Added "view source" on hover for HTML reporter to make it obvious -- Changed: replace custom growl with growl lib -- Fixed duplicate reporting for HTML reporter. Closes [#154](https://github.com/mochajs/mocha/issues/154) -- Fixed silent hook errors in the HTML reporter. Closes [#150](https://github.com/mochajs/mocha/issues/150) - -# 0.5.0 / 2011-12-14 - -- Added: push node_modules directory onto module.paths for relative require Closes [#93](https://github.com/mochajs/mocha/issues/93) -- Added teamcity reporter [blindsey] -- Fixed: recover from uncaught exceptions for tests. Closes [#94](https://github.com/mochajs/mocha/issues/94) -- Fixed: only emit "test end" for uncaught within test, not hook - -# 0.4.0 / 2011-12-14 - -- Added support for test-specific timeouts via `this.timeout(0)`. Closes [#134](https://github.com/mochajs/mocha/issues/134) -- Added guillermo's client-side EventEmitter. Closes [#132](https://github.com/mochajs/mocha/issues/132) -- Added progress indicator to the HTML reporter -- Fixed slow browser tests. Closes [#135](https://github.com/mochajs/mocha/issues/135) -- Fixed "suite" color for light terminals -- Fixed `require()` leak spotted by [guillermo] - -# 0.3.6 / 2011-12-09 - -- Removed suite merging (for now) - -# 0.3.5 / 2011-12-08 - -- Added support for `window.onerror` [guillermo] -- Fixed: clear timeout on uncaught exceptions. Closes [#131](https://github.com/mochajs/mocha/issues/131) [guillermo] -- Added `mocha.css` to PHONY list. -- Added `mocha.js` to PHONY list. - -# 0.3.4 / 2011-12-08 - -- Added: allow `done()` to be called with non-Error -- Added: return Runner from `mocha.run()`. Closes [#126](https://github.com/mochajs/mocha/issues/126) -- Fixed: run afterEach even on failures. Closes [#125](https://github.com/mochajs/mocha/issues/125) -- Fixed clobbering of current runnable. Closes [#121](https://github.com/mochajs/mocha/issues/121) - -# 0.3.3 / 2011-12-08 - -- Fixed hook timeouts. Closes [#120](https://github.com/mochajs/mocha/issues/120) -- Fixed uncaught exceptions in hooks - -# 0.3.2 / 2011-12-05 - -- Fixed weird reporting when `err.message` is not present - -# 0.3.1 / 2011-12-04 - -- Fixed hook event emitter leak. Closes [#117](https://github.com/mochajs/mocha/issues/117) -- Fixed: export `Spec` constructor. Closes [#116](https://github.com/mochajs/mocha/issues/116) - -# 0.3.0 / 2011-12-04 - -- Added `-w, --watch`. Closes [#72](https://github.com/mochajs/mocha/issues/72) -- Added `--ignore-leaks` to ignore global leak checking -- Added browser `?grep=pattern` support -- Added `--globals ` to specify accepted globals. Closes [#99](https://github.com/mochajs/mocha/issues/99) -- Fixed `mocha-debug(1)` on some systems. Closes [#232](https://github.com/mochajs/mocha/issues/232) -- Fixed growl total, use `runner.total` - -# 0.2.0 / 2011-11-30 - -- Added `--globals ` to specify accepted globals. Closes [#99](https://github.com/mochajs/mocha/issues/99) -- Fixed funky highlighting of messages. Closes [#97](https://github.com/mochajs/mocha/issues/97) -- Fixed `mocha-debug(1)`. Closes [#232](https://github.com/mochajs/mocha/issues/232) -- Fixed growl total, use runner.total - -# 0.1.0 / 2011-11-29 - -- Added `suiteSetup` and `suiteTeardown` to TDD interface [David Henderson] -- Added growl icons. Closes [#84](https://github.com/mochajs/mocha/issues/84) -- Fixed coffee-script support - -# 0.0.8 / 2011-11-25 - -- Fixed: use `Runner#total` for accurate reporting - -# 0.0.7 / 2011-11-25 - -- Added `Hook` -- Added `Runnable` -- Changed: `Test` is `Runnable` -- Fixed global leak reporting in hooks -- Fixed: > 2 calls to done() only report the error once -- Fixed: clear timer on failure. Closes [#80](https://github.com/mochajs/mocha/issues/80) - -# 0.0.6 / 2011-11-25 - -- Fixed return on immediate async error. Closes [#80](https://github.com/mochajs/mocha/issues/80) - -# 0.0.5 / 2011-11-24 - -- Fixed: make mocha.opts whitespace less picky [kkaefer] - -# 0.0.4 / 2011-11-24 - -- Added `--interfaces` -- Added `--reporters` -- Added `-c, --colors`. Closes [#69](https://github.com/mochajs/mocha/issues/69) -- Fixed hook timeouts - -# 0.0.3 / 2011-11-23 - -- Added `-C, --no-colors` to explicitly disable -- Added coffee-script support - -# 0.0.2 / 2011-11-22 - -- Fixed global leak detection due to Safari bind() change -- Fixed: escape html entities in Doc reporter -- Fixed: escape html entities in HTML reporter -- Fixed pending test support for HTML reporter. Closes [#66](https://github.com/mochajs/mocha/issues/66) - -# 0.0.1 / 2011-11-22 - -- Added `--timeout` second shorthand support, ex `--timeout 3s`. -- Fixed "test end" event for uncaughtExceptions. Closes [#61](https://github.com/mochajs/mocha/issues/61) - -# 0.0.1-alpha6 / 2011-11-19 - -- Added travis CI support (needs enabling when public) -- Added preliminary browser support -- Added `make mocha.css` target. Closes [#45](https://github.com/mochajs/mocha/issues/45) -- Added stack trace to TAP errors. Closes [#52](https://github.com/mochajs/mocha/issues/52) -- Renamed tearDown to teardown. Closes [#49](https://github.com/mochajs/mocha/issues/49) -- Fixed: cascading hooksc. Closes [#30](https://github.com/mochajs/mocha/issues/30) -- Fixed some colors for non-tty -- Fixed errors thrown in sync test-cases due to nextTick -- Fixed Base.window.width... again give precedence to 0.6.x - -# 0.0.1-alpha5 / 2011-11-17 - -- Added `doc` reporter. Closes [#33](https://github.com/mochajs/mocha/issues/33) -- Added suite merging. Closes [#28](https://github.com/mochajs/mocha/issues/28) -- Added TextMate bundle and `make tm`. Closes [#20](https://github.com/mochajs/mocha/issues/20) - -# 0.0.1-alpha4 / 2011-11-15 - -- Fixed getWindowSize() for 0.4.x - -# 0.0.1-alpha3 / 2011-11-15 - -- Added `-s, --slow ` to specify "slow" test threshold -- Added `mocha-debug(1)` -- Added `mocha.opts` support. Closes [#31](https://github.com/mochajs/mocha/issues/31) -- Added: default [files] to _test/\*.js_ -- Added protection against multiple calls to `done()`. Closes [#35](https://github.com/mochajs/mocha/issues/35) -- Changed: bright yellow for slow Dot reporter tests - -# 0.0.1-alpha2 / 2011-11-08 - -- Missed this one :) - -# 0.0.1-alpha1 / 2011-11-08 - -- Initial release diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 31d5e40ce9..f155418edd 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -39,13 +39,13 @@ ## Introduction -Hi stranger! We've written this document for: +Hi stranger! We've written this document for: 1. Active maintainers of Mocha 1. Prospective maintainers of Mocha 1. Anyone curious about how Mocha's maintainers maintain Mocha -The purpose of this document is to *describe our processes*. We want to avoid conflicts and confusion around "unwritten rules". In our opinion, the most straightforward way to address this is to *write them down*. This *also* happens to be the most straightforward way to change them! +The purpose of this document is to _describe our processes_. We want to avoid conflicts and confusion around "unwritten rules". In our opinion, the most straightforward way to address this is to _write them down_. This _also_ happens to be the most straightforward way to change them! To assist in eliminating ambiguity, we will define some terms. @@ -55,7 +55,7 @@ Anyone involved with Mocha will fall into one of these buckets: **user**, **cont ### User -A "user" for the purpose of this document is any *individual developer* who consumes Mocha to write and/or execute tests. A user interacts with contributors. A user interacts with the software, web site, documentation, etc., which these contributors provide. +A "user" for the purpose of this document is any _individual developer_ who consumes Mocha to write and/or execute tests. A user interacts with contributors. A user interacts with the software, web site, documentation, etc., which these contributors provide. As a user, you're expected to follow the [code of conduct](https://github.com/mochajs/mocha/blob/master/.github/CODE_OF_CONDUCT.md) when interacting in Mocha's "official" social spaces. This includes: @@ -70,7 +70,7 @@ This is the most important thing: **You don't have to write code to be a contributor!** -A "contributor" is any individual who has *given back* in some way to the project and its community. Contributions include (but are not limited to): +A "contributor" is any individual who has _given back_ in some way to the project and its community. Contributions include (but are not limited to): 1. Reporting bugs which follow the reporting guidelines 1. Suggesting and debating enhancements that have wide applicability @@ -84,11 +84,11 @@ A "contributor" is any individual who has *given back* in some way to the projec 1. Recruiting more contributors! Don't spam. 1. Researching the user base, getting feedback, etc. Don't spam. -A contributor is *usually* a user as well, but this isn't a hard-and-fast rule. A contributor is also expected to adhere to the [code of conduct](https://github.com/mochajs/mocha/blob/master/.github/CODE_OF_CONDUCT.md) as a user would. +A contributor is _usually_ a user as well, but this isn't a hard-and-fast rule. A contributor is also expected to adhere to the [code of conduct](https://github.com/mochajs/mocha/blob/master/.github/CODE_OF_CONDUCT.md) as a user would. -As you can see, it's wide open! Think of it another way: if you are *adding value to Mocha*, then you are a contributor. +As you can see, it's wide open! Think of it another way: if you are _adding value to Mocha_, then you are a contributor. -> Due to the nature of GitHub, it's a challenge to recognize those who've made contributions *elsewhere* on the web, or even contributions of the "non-code" variety. If you know of any great contributions which have gone unnoticed, please bring them to the maintainers' attention! +> Due to the nature of GitHub, it's a challenge to recognize those who've made contributions _elsewhere_ on the web, or even contributions of the "non-code" variety. If you know of any great contributions which have gone unnoticed, please bring them to the maintainers' attention! #### A Note About Donations @@ -98,11 +98,11 @@ We love our backers and sponsors! 💕 ### Maintainer -A maintainer has certain "rights" (or "permissions") to the Mocha project and other projects under the `mochajs` organization. There's no way to dance around this: with these rights come increased responsibilities. +A maintainer has certain "rights" (or "permissions") to the Mocha project and other projects under the `mochajs` organization. There's no way to dance around this: with these rights come increased responsibilities. -However, **there is no expectation of a standard of technical ability** to be a maintainer of Mocha. This doesn't imply a lack of technical oversight--every pull request will eventually be reviewed. +However, **there is no expectation of a standard of technical ability** to be a maintainer of Mocha. This doesn't imply a lack of technical oversight--every pull request will eventually be reviewed. -**If you think you aren't experienced enough to maintain a project like Mocha, you are incorrect.** The only requirements are the above responsibilities and a desire to help the project. It bears repeating: +**If you think you aren't experienced enough to maintain a project like Mocha, you are incorrect.** The only requirements are the above responsibilities and a desire to help the project. It bears repeating: **You don't have to write code to be a maintainer!** @@ -110,30 +110,30 @@ However, **there is no expectation of a standard of technical ability** to be a #### The Responsibilities of a Maintainer -As a maintainer, you are expected to *not just* "follow" the code of conduct, but embody its values. Your public behavior, whether in the physical or virtual world, reflects upon the project and other maintainers. +As a maintainer, you are expected to _not just_ "follow" the code of conduct, but embody its values. Your public behavior, whether in the physical or virtual world, reflects upon the project and other maintainers. -> If you don't understand the code of conduct, or why it exists, it is *your responsibility* to educate yourself. +> If you don't understand the code of conduct, or why it exists, it is _your responsibility_ to educate yourself. > This does not imply the CoC is immutable. -Furthermore, a maintainer is a contributor who **contributes regularly**, or expresses a *desire to do so.* That could be every day--but it might be once a week, or even once a month. Your boss doesn't work here; contribute as often as you wish. We are all people with Real Lives, and for many of us, contributing to OSS is just a hobby! +Furthermore, a maintainer is a contributor who **contributes regularly**, or expresses a _desire to do so._ That could be every day--but it might be once a week, or even once a month. Your boss doesn't work here; contribute as often as you wish. We are all people with Real Lives, and for many of us, contributing to OSS is just a hobby! -Finally, a maintainer must help define what makes Mocha "Mocha". At minimum, a maintainer must *understand* the current definition (if a maintainer is not interested in decision-making). Some of these questions include: +Finally, a maintainer must help define what makes Mocha "Mocha". At minimum, a maintainer must _understand_ the current definition (if a maintainer is not interested in decision-making). Some of these questions include: - What's the scope of Mocha? - Where should we focus efforts? - What's urgent, what can wait? - What can we break? What's off-limits? -- What user feedback is valuable? What isn't? +- What user feedback is valuable? What isn't? -As maintainers, *we work together* to learn about the nature of these questions. If we try hard enough, we even come to some answers! +As maintainers, _we work together_ to learn about the nature of these questions. If we try hard enough, we even come to some answers! -A maintainer *must* also have 2FA enabled on their GitHub account. +A maintainer _must_ also have 2FA enabled on their GitHub account. > If you think that you aren't familiar with mocha's internals enough to contribute, please watch [This walkthrough video!](https://youtu.be/zLayCLcIno0) #### The Rights of a Maintainer -You may choose to do zero or more of these *at their discretion*: +You may choose to do zero or more of these _at their discretion_: - Merge pull requests - Modify issues (closing, adding labels, assigning them other maintainers, etc.) @@ -144,7 +144,7 @@ You may choose to do zero or more of these *at their discretion*: - Add new maintainers to the team - Tag releases and publish Mocha to npm -> While maintainers have the ability to commit directly to the `master` branch, *this is to be avoided* if any other maintainer could reasonably take issue with the change, or the change affects Mocha's API or output. For example, a spelling correction in `CHANGELOG.md` may not require a pull request. A change to a reporter's output most certainly would! Maintainers are trusted to use their best judgement; if unsure, err on the side of caution. +> While maintainers have the ability to commit directly to the `master` branch, _this is to be avoided_ if any other maintainer could reasonably take issue with the change, or the change affects Mocha's API or output. For example, a spelling correction in `CHANGELOG.md` may not require a pull request. A change to a reporter's output most certainly would! Maintainers are trusted to use their best judgement; if unsure, err on the side of caution. #### About "Owners" @@ -155,20 +155,20 @@ Some maintainers will have full admin rights to the [mochajs org](https://github ## Mocha's Decision-Making Process -Mocha follows a [consensus-seeking decision-making](https://en.wikipedia.org/wiki/Consensus-seeking_decision-making) process. In other words, all maintainers attempt to come to agreement. If that fails, we decide by a simple vote. +Mocha follows a [consensus-seeking decision-making](https://en.wikipedia.org/wiki/Consensus-seeking_decision-making) process. In other words, all maintainers attempt to come to agreement. If that fails, we decide by a simple vote. -Active maintainers will make an effort to solicit feedback from others before making important or potentially controversial decisions. Given the varying geographical distribution and availability of the maintenance team, we resolve to do the best we can to solicit feedback. +Active maintainers will make an effort to solicit feedback from others before making important or potentially controversial decisions. Given the varying geographical distribution and availability of the maintenance team, we resolve to do the best we can to solicit feedback. -In other words, to have your opinion heard, participate regularly. The rest of the team won't wait on feedback that isn't necessarily forthcoming! +In other words, to have your opinion heard, participate regularly. The rest of the team won't wait on feedback that isn't necessarily forthcoming! ## Communication -Maintainers will mainly gather in [the mochajs/contributors channel](https://gitter.im/mochajs/contributors). This is a *public* channel, and *anyone* can join. +Maintainers will mainly gather in [the mochajs/contributors channel](https://gitter.im/mochajs/contributors). This is a _public_ channel, and _anyone_ can join. Videoconference (or audio) calls may happen on a regular or irregular basis, as schedules allow. This is mainly because we have Real Lives and time zones suck. ## Working with Issues & Pull Requests -All new issues will need to be triaged, and pull requests must be examined. Maintainers must understand [Semantic Versioning](http://semver.org) ("SemVer"), as Mocha follows it strictly. +All new issues will need to be triaged, and pull requests must be examined. Maintainers must understand [Semantic Versioning](http://semver.org) ("SemVer"), as Mocha follows it strictly. > If you see an issue or PR that could use some labels, please add them! @@ -180,24 +180,24 @@ The TL;DR of Semantic Versioning is: - MINOR version when you add functionality in a backwards-compatible manner, and - PATCH version when you make backwards-compatible bug fixes. -Pull requests *must* have one of these three (3) labels: +Pull requests _must_ have one of these three (3) labels: - `semver-patch` for backwards-compatible bug fixes, documentation, or anything which does not affect a "production" (`npm install mocha`) installation of Mocha - `semver-minor` for backwards-compatible new features or usability/interface enhancements - `semver-major` for backwards-incompatible ("breaking") changes to the API -A PR which introduces a breaking change is considered to be `semver-major`, *regardless* of whether it's a bug fix, feature, or whatever. +A PR which introduces a breaking change is considered to be `semver-major`, _regardless_ of whether it's a bug fix, feature, or whatever. For the purposes of the above definitions, Mocha has some unique considerations, and includes the following in its definition of "API": -1. Mocha's *documented*, programmatic interface which *is not explicitly tagged with `@private`* +1. Mocha's _documented_, programmatic interface which _is not explicitly tagged with `@private`_ 1. Mocha's machine-readable reporter output 1. Mocha's default settings 1. Mocha's command-line options 1. The environments which Mocha supports; this includes: - 1. Browser versions - 1. Node.js versions - 1. Compatibility with popular module loaders (e.g., AMD) + 1. Browser versions + 1. Node.js versions + 1. Compatibility with popular module loaders (e.g., AMD) **Err on the side of the user; breaking changes to private APIs will be `semver-major`, if and only if they are known to be consumed by actively developed project(s).** @@ -213,18 +213,18 @@ Examples of a breaking changes might be: ### Questions -Support questions should be answered if possible, but the user should be directed to the chat room, StackOverflow, or Google Groups for further help, *if* it is indeed a Mocha-related issue. +Support questions should be answered if possible, but the user should be directed to the chat room, StackOverflow, or Google Groups for further help, _if_ it is indeed a Mocha-related issue. -If it's *not* a Mocha problem (people tend not to believe this), you may want to show a counter-example. It's often helpful to direct the issue author to the responsible project, if you can determine what that is. +If it's _not_ a Mocha problem (people tend not to believe this), you may want to show a counter-example. It's often helpful to direct the issue author to the responsible project, if you can determine what that is. -- `faq`: Issues which are *repeatedly* asked support questions or misunderstandings. This may also apply to questions which receive a lot of 👍's +- `faq`: Issues which are _repeatedly_ asked support questions or misunderstandings. This may also apply to questions which receive a lot of 👍's - `question`: Add this label if it's just a support question ### Bugs - `confirmed-bug`: A confirmed bug - `unconfirmed-bug`: A maintainer has not yet or cannot reproduce; typically `needs-feedback` follows (see "Feedback & Follow-ups" below) -- `invalid`: Not a bug. Close the issue. +- `invalid`: Not a bug. Close the issue. - `wontfix`: A bug, but for Reasons, it won't get fixed. ### Features @@ -243,22 +243,22 @@ If it's *not* a Mocha problem (people tend not to believe this), you may want to ### Feedback & Follow-ups -Issues or PRs which require action or feedback from a *specific* maintainer, should have that item *assigned* to them. +Issues or PRs which require action or feedback from a _specific_ maintainer, should have that item _assigned_ to them. -- `needs-feedback`: Issues which *need feedback from the original author*. Will automatically become `stale` (see "Meta" section below) -- `needs-review`: For *pull requests only*; PRs which need a maintainer to inspect and/or merge them +- `needs-feedback`: Issues which _need feedback from the original author_. Will automatically become `stale` (see "Meta" section below) +- `needs-review`: For _pull requests only_; PRs which need a maintainer to inspect and/or merge them ### Meta -- `stale`: The "stalebot" marks things as stale and will close issues if they need feedback but haven't received any. Comment on an issue to prevent this from happening. -- `help wanted`: If it's an issue that is not a high priority for the maintenance team, use this label to solicit contributions. Note lack of `-` in this label's name. +- `stale`: The "stalebot" marks things as stale and will close issues if they need feedback but haven't received any. Comment on an issue to prevent this from happening. +- `help wanted`: If it's an issue that is not a high priority for the maintenance team, use this label to solicit contributions. Note lack of `-` in this label's name. - `good-first-issue`: Typically combined with `help wanted`; an issue that new contributors to Mocha may find straightforward. ### Closing Issues Write "closes #" or "resolves #" in a commit or PR to have the original issue closed automatically once the PR is merged. -For any issue which is a duplicate, write "duplicate of #" in a new comment, and close the issue. [Read more about marking issues as duplicates](https://help.github.com/articles/about-duplicate-issues-and-pull-requests/). +For any issue which is a duplicate, write "duplicate of #" in a new comment, and close the issue. [Read more about marking issues as duplicates](https://help.github.com/articles/about-duplicate-issues-and-pull-requests/). If the issue is a support question, and you believe it has been answered, close the issue. @@ -266,13 +266,13 @@ If the issue is not Mocha-related, and/or a bug cannot be confirmed, label it `i ## Commenting on Issues and Reviewing Pull Requests -**All maintainers should be courteous and kind.** Thank the external contributor for the pull request, even if it is not merged. If the pull request has been opened (and subsequently closed) without discussion in a corresponding issue, let them know that by creating an issue first, they could have saved wasted effort. *Clearly and objectively* explain the reasoning for rejecting any PR. +**All maintainers should be courteous and kind.** Thank the external contributor for the pull request, even if it is not merged. If the pull request has been opened (and subsequently closed) without discussion in a corresponding issue, let them know that by creating an issue first, they could have saved wasted effort. _Clearly and objectively_ explain the reasoning for rejecting any PR. -If you need more information in an issue, nicely ask the user to provide it. Remind them to use the issue/PR templates if they have not. If the user never gets around to it, the "stalebot" will close it eventually anyhow. +If you need more information in an issue, nicely ask the user to provide it. Remind them to use the issue/PR templates if they have not. If the user never gets around to it, the "stalebot" will close it eventually anyhow. ### Reviewing Code -Use GitHub's code review features. Requesting a review from another maintainer *may or may not* actually result in a review; don't wait on it. If the PR cannot move forward without input from a certain maintainer, *assign them to the PR*. +Use GitHub's code review features. Requesting a review from another maintainer _may or may not_ actually result in a review; don't wait on it. If the PR cannot move forward without input from a certain maintainer, _assign them to the PR_. ### The Part About Jerks @@ -280,18 +280,18 @@ There will be jerks. #### Rude or Entitled People -These are users who feel the Mocha project and its maintainers *owe them* time or support. This is incorrect. +These are users who feel the Mocha project and its maintainers _owe them_ time or support. This is incorrect. -However, this behavior is often indicative of someone who is "new" to open source. Many just don't know better. It is not your *responsibility* to educate them (again, you owe them nothing). +However, this behavior is often indicative of someone who is "new" to open source. Many just don't know better. It is not your _responsibility_ to educate them (again, you owe them nothing). Here are some suggestions: 1. If u mad, wait 20 minutes before writing a comment. -1. "Kill them with kindness". Explain how they are presenting themselves; maybe link to a good article or two about it. -1. Don't make it about "users vs. maintainers". Treat them like a potential future maintainer. -1. Avoid adding to the drama. You could try to reach out privately; email may be in their GitHub profile. You will likely never hear from that individual again (problem solved) +1. "Kill them with kindness". Explain how they are presenting themselves; maybe link to a good article or two about it. +1. Don't make it about "users vs. maintainers". Treat them like a potential future maintainer. +1. Avoid adding to the drama. You could try to reach out privately; email may be in their GitHub profile. You will likely never hear from that individual again (problem solved) 1. If an issue is getting out of control, lock it. -1. If someone is *repeatedly* rude and does not correct their mistakes, you may ban them from participating in the `mochajs` org. If you do not have permission to do so, contact one which does (an "owner"). +1. If someone is _repeatedly_ rude and does not correct their mistakes, you may ban them from participating in the `mochajs` org. If you do not have permission to do so, contact one which does (an "owner"). #### Code of Conduct Violations @@ -304,29 +304,29 @@ Here are some suggestions: ## Branches -`master` is the only maintained branch in `mochajs/mocha` or any of the other repos. **`master` is the only branch to which force-pushing is disallowed.** +`master` is the only maintained branch in `mochajs/mocha` or any of the other repos. **`master` is the only branch to which force-pushing is disallowed.** Maintainers may push new branches to a repo, as long as they remove them when finished (merging a PR will prompt to do so). -Please *please* ***please*** delete old or unused branches. +Please _please_ **_please_** delete old or unused branches. ## Merging PRs -GitHub has several options for how to merge a PR. Here's what we do: +GitHub has several options for how to merge a PR. Here's what we do: -1. *If a PR has multiple commits*, "Squash". -1. *If a PR has a single commit*, "Rebase". +1. _If a PR has multiple commits_, "Squash". +1. _If a PR has a single commit_, "Rebase". 1. Don't "Merge". **Upon acceptance of a PR, you must assign it a milestone.** ### Using Milestones -If you know that the PR is breaking, assign it to a new or existing milestone correlating with the next major release. For example, if Mocha's current version is v6.5.2, then this milestone would be named `v7.0.0`. +If you know that the PR is breaking, assign it to a new or existing milestone correlating with the next major release. For example, if Mocha's current version is v6.5.2, then this milestone would be named `v7.0.0`. -Likewise, if the PR is `semver-minor`, create or use a new milestone correlating to the next *minor* release, e.g., `v6.6.0`. +Likewise, if the PR is `semver-minor`, create or use a new milestone correlating to the next _minor_ release, e.g., `v6.6.0`. -If it's unclear what the next milestone will be, use or create a milestone named `next`. This milestone will be renamed to the new version at release time. +If it's unclear what the next milestone will be, use or create a milestone named `next`. This milestone will be renamed to the new version at release time. By using milestones, we can cherry-pick non-breaking changes into minor or patch releases, and keep `master` as the latest version. @@ -334,43 +334,43 @@ By using milestones, we can cherry-pick non-breaking changes into minor or patch ## Mocha's Release Process -*It's easier to release often.* +_It's easier to release often._ 1. Decide whether this is a `patch`, `minor`, or `major` release. 1. Checkout `master` in your working copy & pull. -1. Modify `CHANGELOG.md`; follow the existing conventions in that file. Use the "pull request" number, unless there isn't one. *You do not need to add Markdown links; this is done automatically.* - 1. You can omit stuff from `CHANGELOG.md` that was done by a maintainer, but would have no interest to consumers of Mocha. - 1. If the changes aren't of interest to consumers but *were not* made by a maintainer, reference them anyway. It's cool to give attribution! -1. Use `npm version` (use `npm@6+`) to bump the version; see `npm version --help` for more info. (Hint--use `-m`: e.g., `npm version patch -m 'Release v%s'`) - 1. This command will update the list of contributors (from the Git history) in `package.json`, and add GitHub links to `CHANGELOG.md`. - 1. These changes are then added to the Git "stage" and will be added to the commit. +1. Modify `CHANGELOG.md`; follow the existing conventions in that file. Use the "pull request" number, unless there isn't one. _You do not need to add Markdown links; this is done automatically._ + 1. You can omit stuff from `CHANGELOG.md` that was done by a maintainer, but would have no interest to consumers of Mocha. + 1. If the changes aren't of interest to consumers but _were not_ made by a maintainer, reference them anyway. It's cool to give attribution! +1. Use `npm version` (use `npm@6+`) to bump the version; see `npm version --help` for more info. (Hint--use `-m`: e.g., `npm version patch -m 'Release v%s'`) + 1. This command will update the list of authors (from the Git history) in `AUTHORS`, and add GitHub links to `CHANGELOG.md`. + 1. These changes are then added to the Git "stage" and will be added to the commit. 1. Push `master` to `origin` with your new tag; e.g. `git push origin master --tags` -1. Copy & paste the `CHANGELOG.md` lines to a new GitHub "release". Save release as draft. +1. Copy & paste the `CHANGELOG.md` lines to a new GitHub "release". Save release as draft. 1. Meanwhile, you can check [the build](https://travis-ci.org/mochajs/mocha) on Travis-CI and [AppVeyor](https://ci.appveyor.com/project/boneskull/mocha). 1. Once the build is green, and you're satisfied with the release notes, open your draft release on GitHub, then click "publish." -1. Back in your working copy, run `npm publish`. *If you're doing a prerelease, ensure that you use `--tag=next`.* -1. Announce the update on Twitter or just tell your dog or something. New releases will be automatically tweeted by [@b0neskull](https://twitter.com/b0neskull) via a feed subscription to Mocha's "releases" page on GitHub. +1. Back in your working copy, run `npm publish`. _If you're doing a prerelease, ensure that you use `--tag=next`._ +1. Announce the update on Twitter or just tell your dog or something. New releases will be automatically tweeted by [@b0neskull](https://twitter.com/b0neskull) via a feed subscription to Mocha's "releases" page on GitHub. In addition to above, you'll need to ensure the docs at [https://mochajs.org](https://mochajs.org) are updated: -1. *If you're doing a prerelease*, fast-forward the `next` branch to `master`, and push it. This updates [https://next.mochajs.org](https://next.mochajs.org). That's all. -1. *If this is NOT a prerelease*, fast-forward the `mochajs.org` branch to `master` and push it. This updates [https://mochajs.org](https://mochajs.org). -1. *If this is a "final" release* (the first release of a major *after* one or more prereleases) then remove the `next` tag from npm via `npm dist-tag rm next`. +1. _If you're doing a prerelease_, fast-forward the `next` branch to `master`, and push it. This updates [https://next.mochajs.org](https://next.mochajs.org). That's all. +1. _If this is NOT a prerelease_, fast-forward the `mochajs.org` branch to `master` and push it. This updates [https://mochajs.org](https://mochajs.org). +1. _If this is a "final" release_ (the first release of a major _after_ one or more prereleases) then remove the `next` tag from npm via `npm dist-tag rm next`. -*Note: there are too many steps above.* +_Note: there are too many steps above._ ## About The JS Foundation -The [JS Foundation](https://js.foundation) retains copyright of all projects underneath the [mochajs org](https://github.com/mochajs). The Foundation does not influence technical decisions nor the project roadmap. It is, however, charged with ensuring the continued vitality and sustainability of projects under its banner. +The [JS Foundation](https://js.foundation) retains copyright of all projects underneath the [mochajs org](https://github.com/mochajs). The Foundation does not influence technical decisions nor the project roadmap. It is, however, charged with ensuring the continued vitality and sustainability of projects under its banner. As a maintainer, you have access to the resources the JS Foundation provides. ## About OpenCollective -Mocha collects donations [via OpenCollective](https://opencollective.com/mochajs). As a maintainer, you may help decide how the funds are used. These decisions are made via a consensus-seeking process, much like any other decision. +Mocha collects donations [via OpenCollective](https://opencollective.com/mochajs). As a maintainer, you may help decide how the funds are used. These decisions are made via a consensus-seeking process, much like any other decision. Expense transparency is built in to OpenCollective. -* * * +--- -Questions? Ask in the [contributors' chat room](https://gitter.im/mochajs/contributors)! +Questions? Ask in the [contributors' chat room](https://gitter.im/mochajs/contributors)! diff --git a/browser-entry.js b/browser-entry.js index fd89117755..3f770fac49 100644 --- a/browser-entry.js +++ b/browser-entry.js @@ -129,7 +129,7 @@ mocha.setup = function(opts) { opts = {ui: opts}; } for (var opt in opts) { - if (opts.hasOwnProperty(opt)) { + if (Object.prototype.hasOwnProperty.call(opts, opt)) { this[opt](opts[opt]); } } diff --git a/docs/changelogs/CHANGELOG_V3_older.md b/docs/changelogs/CHANGELOG_V3_older.md new file mode 100644 index 0000000000..d9ca257f05 --- /dev/null +++ b/docs/changelogs/CHANGELOG_V3_older.md @@ -0,0 +1,1258 @@ +# 3.5.3 / 2017-09-11 + +## :bug: Fixes + +- [#3003](https://github.com/mochajs/mocha/pull/3003): Fix invalid entities in xUnit reporter first appearing in v3.5.1 ([@jkrems](https://github.com/jkrems)) + +# 3.5.2 / 2017-09-10 + +## :bug: Fixes + +- [#3001](https://github.com/mochajs/mocha/pull/3001): Fix AMD-related failures first appearing in v3.5.1 ([@boneskull](https://github.com/boneskull)) + +# 3.5.1 / 2017-09-09 + +## :newspaper: News + +- :mega: Mocha is now sponsoring [PDXNode](http://pdxnode.org)! If you're in the [Portland](https://wikipedia.org/wiki/Portland,_Oregon) area, come check out the monthly talks and hack nights! + +## :bug: Fixes + +- [#2997](https://github.com/mochajs/mocha/pull/2997): Fix missing `xit` export for "require" interface ([@solodynamo](https://github.com/solodynamo)) +- [#2957](https://github.com/mochajs/mocha/pull/2957): Fix unicode character handling in XUnit reporter failures ([@jkrems](https://github.com/jkrems)) + +## :nut_and_bolt: Other + +- [#2986](https://github.com/mochajs/mocha/pull/2986): Add issue and PR templates ([@kungapal](https://github.com/kungapal)) +- [#2918](https://github.com/mochajs/mocha/pull/2918): Drop bash dependency for glob-related tests ([@ScottFreeCode](https://github.com/ScottFreeCode)) +- [#2922](https://github.com/mochajs/mocha/pull/2922): Improve `--compilers` coverage ([@ScottFreeCode](https://github.com/ScottFreeCode)) +- [#2981](https://github.com/mochajs/mocha/pull/2981): Fix tpyos and spelling errors ([@jsoref](https://github.com/jsoref)) + +# 3.5.0 / 2017-07-31 + +## :newspaper: News + +- Mocha now has a [code of conduct](https://github.com/mochajs/mocha/blob/master/.github/CODE_OF_CONDUCT.md) (thanks [@kungapal](https://github.com/kungapal)!). +- Old issues and PRs are now being marked "stale" by [Probot's "Stale" plugin](https://github.com/probot/stale). If an issue is marked as such, and you would like to see it remain open, simply add a new comment to the ticket or PR. +- **WARNING**: Support for non-ES5-compliant environments will be dropped starting with version 4.0.0 of Mocha! + +## :lock: Security Fixes + +- [#2860](https://github.com/mochajs/mocha/pull/2860): Address [CVE-2015-8315](https://nodesecurity.io/advisories/46) via upgrade of [debug](https://npm.im/debug) ([@boneskull](https://github.com/boneskull)) + +## :tada: Enhancements + +- [#2696](https://github.com/mochajs/mocha/pull/2696): Add `--forbid-only` and `--forbid-pending` flags. Use these in CI or hooks to ensure tests aren't accidentally being skipped! ([@charlierudolph](https://github.com/charlierudolph)) +- [#2813](https://github.com/mochajs/mocha/pull/2813): Support Node.js 8's `--napi-modules` flag ([@jupp0r](https://github.com/jupp0r)) + +## :nut_and_bolt: Other + +- Various CI-and-test-related fixes and improvements ([@boneskull](https://github.com/boneskull), [@dasilvacontin](https://github.com/dasilvacontin), [@PopradiArpad](https://github.com/PopradiArpad), [@Munter](https://github.com/munter), [@ScottFreeCode](https://github.com/ScottFreeCode)) +- "Officially" support Node.js 8 ([@elergy](https://github.com/elergy)) + +# 3.4.2 / 2017-05-24 + +## :bug: Fixes + +- [#2802](https://github.com/mochajs/mocha/issues/2802): Remove call to deprecated `os.tmpDir` ([@makepanic](https://github.com/makepanic)) +- [#2820](https://github.com/mochajs/mocha/pull/2820): Eagerly set `process.exitCode` ([@chrisleck](https://github.com/chrisleck)) + +## :nut_and_bolt: Other + +- [#2807](https://github.com/mochajs/mocha/pull/2807): Move linting into an npm script ([@Munter](https://github.com/munter)) + +# 3.4.1 / 2017-05-14 + +Fixed a publishing mishap with git's autocrlf settings. + +# 3.4.0 / 2017-05-14 + +Mocha is now moving to a quicker release schedule: when non-breaking changes are merged, a release should happen that week. + +This week's highlights: + +- `allowUncaught` added to commandline as `--allow-uncaught` (and bugfixed) +- warning-related Node flags + +## :tada: Enhancements + +- [#2793](https://github.com/mochajs/mocha/pull/2793), [#2697](https://github.com/mochajs/mocha/pull/2697): add --allowUncaught to Node.js ([@lrowe](https://github.com/lrowe)) +- [#2733](https://github.com/mochajs/mocha/pull/2733): Add `--no-warnings` and `--trace-warnings` flags ([@sonicdoe](https://github.com/sonicdoe)) + +## :bug: Fixes + +- [#2793](https://github.com/mochajs/mocha/pull/2793), [#2697](https://github.com/mochajs/mocha/pull/2697): fix broken allowUncaught ([@lrowe](https://github.com/lrowe)) + +## :nut_and_bolt: Other + +- [#2778](https://github.com/mochajs/mocha/pull/2778): Add license report and scan status ([@xizhao](https://github.com/xizhao)) +- [#2794](https://github.com/mochajs/mocha/pull/2794): no special case for macOS running Karma locally ([@boneskull](https://github.com/boneskull)) +- [#2795](https://github.com/mochajs/mocha/pull/2795): reverts use of semistandard directly ([#2648](https://github.com/mochajs/mocha/pull/2648)) ([@boneskull](https://github.com/boneskull)) + +# 3.3.0 / 2017-04-24 + +Thanks to all our contributors, maintainers, sponsors, and users! ❤️ + +As highlights: + +- We've got coverage now! +- Testing is looking less flaky \\o/. +- No more nitpicking about "mocha.js" build on PRs. + +## :tada: Enhancements + +- [#2659](https://github.com/mochajs/mocha/pull/2659): Adds support for loading reporter from an absolute or relative path ([@sul4bh](https://github.com/sul4bh)) +- [#2769](https://github.com/mochajs/mocha/pull/2769): Support `--inspect-brk` on command-line ([@igwejk](https://github.com/igwejk)) + +## :bug: Fixes + +- [#2662](https://github.com/mochajs/mocha/pull/2662): Replace unicode chars w/ hex codes in HTML reporter ([@rotemdan](https://github.com/rotemdan)) + +## :mag: Coverage + +- [#2672](https://github.com/mochajs/mocha/pull/2672): Add coverage for node tests ([@c089](https://github.com/c089), [@Munter](https://github.com/munter)) +- [#2680](https://github.com/mochajs/mocha/pull/2680): Increase tests coverage for base reporter ([@epallerols](https://github.com/epallerols)) +- [#2690](https://github.com/mochajs/mocha/pull/2690): Increase tests coverage for doc reporter ([@craigtaub](https://github.com/craigtaub)) +- [#2701](https://github.com/mochajs/mocha/pull/2701): Increase tests coverage for landing, min, tap and list reporters ([@craigtaub](https://github.com/craigtaub)) +- [#2691](https://github.com/mochajs/mocha/pull/2691): Increase tests coverage for spec + dot reporters ([@craigtaub](https://github.com/craigtaub)) +- [#2698](https://github.com/mochajs/mocha/pull/2698): Increase tests coverage for xunit reporter ([@craigtaub](https://github.com/craigtaub)) +- [#2699](https://github.com/mochajs/mocha/pull/2699): Increase tests coverage for json-stream, markdown and progress reporters ([@craigtaub](https://github.com/craigtaub)) +- [#2703](https://github.com/mochajs/mocha/pull/2703): Cover .some() function in utils.js with tests ([@seppevs](https://github.com/seppevs)) +- [#2773](https://github.com/mochajs/mocha/pull/2773): Add tests for loading reporters w/ relative/absolute paths ([@sul4bh](https://github.com/sul4bh)) + +## :nut_and_bolt: Other + +- Remove bin/.eslintrc; ensure execs are linted ([@boneskull](https://github.com/boneskull)) +- [#2542](https://github.com/mochajs/mocha/issues/2542): Expand CONTRIBUTING.md ([@boneskull](https://github.com/boneskull)) +- [#2660](https://github.com/mochajs/mocha/pull/2660): Double timeouts on integration tests ([@Munter](https://github.com/munter)) +- [#2653](https://github.com/mochajs/mocha/pull/2653): Update copyright year ([@Scottkao85], [@Munter](https://github.com/munter)) +- [#2621](https://github.com/mochajs/mocha/pull/2621): Update dependencies to enable Greenkeeper ([@boneskull](https://github.com/boneskull), [@greenkeeper](https://github.com/greenkeeper)) +- [#2625](https://github.com/mochajs/mocha/pull/2625): Use trusty container in travis-ci; use "artifacts" addon ([@boneskull](https://github.com/boneskull)) +- [#2670](https://github.com/mochajs/mocha/pull/2670): doc(CONTRIBUTING): fix link to org members ([@coderbyheart](https://github.com/coderbyheart)) +- Add Mocha propaganda to README.md ([@boneskull](https://github.com/boneskull)) +- [#2470](https://github.com/mochajs/mocha/pull/2470): Avoid test flake in "delay" test ([@boneskull](https://github.com/boneskull)) +- [#2675](https://github.com/mochajs/mocha/pull/2675): Limit browser concurrency on sauce ([@boneskull](https://github.com/boneskull)) +- [#2669](https://github.com/mochajs/mocha/pull/2669): Use temporary test-only build of mocha.js for browsers tests ([@Munter](https://github.com/munter)) +- Fix "projects" link in README.md ([@boneskull](https://github.com/boneskull)) +- [#2678](https://github.com/mochajs/mocha/pull/2678): Chore(Saucelabs): test on IE9, IE10 and IE11 ([@coderbyheart](https://github.com/coderbyheart)) +- [#2648](https://github.com/mochajs/mocha/pull/2648): Use `semistandard` directly ([@kt3k](https://github.com/kt3k)) +- [#2727](https://github.com/mochajs/mocha/pull/2727): Make the build reproducible ([@lamby](https://github.com/lamby)) + +# 3.2.0 / 2016-11-24 + +## :newspaper: News + +### Mocha is now a JS Foundation Project! + +Mocha is proud to have joined the [JS Foundation](https://js.foundation). For more information, [read the announcement](https://js.foundation/announcements/2016/10/17/Linux-Foundation-Unites-JavaScript-Community-Open-Web-Development/). + +### Contributor License Agreement + +Under the foundation, all contributors to Mocha must sign the [JS Foundation CLA](https://js.foundation/CLA/) before their code can be merged. When sending a PR--if you have not already signed the CLA--a friendly bot will ask you to do so. + +Mocha remains licensed under the [MIT license](https://github.com/mochajs/mocha/blob/master/LICENSE). + +## :bug: Bug Fix + +- [#2535](https://github.com/mochajs/mocha/issues/2535): Fix crash when `--watch` encounters broken symlinks ([@villesau](https://github.com/villesau)) +- [#2593](https://github.com/mochajs/mocha/pull/2593): Fix (old) regression; incorrect symbol shown in `list` reporter ([@Aldaviva](https://github.com/Aldaviva)) +- [#2584](https://github.com/mochajs/mocha/issues/2584): Fix potential error when running XUnit reporter ([@vobujs](https://github.com/vobujs)) + +## :tada: Enhancement + +- [#2294](https://github.com/mochajs/mocha/issues/2294): Improve timeout error messaging ([@jeversmann](https://github.com/jeversmann), [@boneskull](https://github.com/boneskull)) +- [#2520](https://github.com/mochajs/mocha/pull/2520): Add info about `--inspect` flag to CLI help ([@ughitsaaron](https://github.com/ughitsaaron)) + +## :nut_and_bolt: Other + +- [#2570](https://github.com/mochajs/mocha/issues/2570): Use [karma-mocha](https://npmjs.com/package/karma-mocha) proper ([@boneskull](https://github.com/boneskull)) +- Licenses updated to reflect new copyright, add link to license and browser matrix to `README.md` ([@boneskull](https://github.com/boneskull), [@ScottFreeCode](https://github.com/ScottFreeCode), [@dasilvacontin](https://github.com/dasilvacontin)) + +Thanks to all our contributors, sponsors and backers! Keep on the lookout for a public roadmap and new contribution guide coming soon. + +# 3.1.2 / 2016-10-10 + +## :bug: Bug Fix + +- [#2528](https://github.com/mochajs/mocha/issues/2528): Recovery gracefully if an `Error`'s `stack` property isn't writable ([@boneskull](https://github.com/boneskull)) + +# 3.1.1 / 2016-10-09 + +## :bug: Bug Fix + +- [#1417](https://github.com/mochajs/mocha/issues/1417): Don't report `done()` was called multiple times when it wasn't ([@frankleonrose](https://github.com/frankleonrose)) + +## :nut_and_bolt: Other + +- [#2490](https://github.com/mochajs/mocha/issues/2490): Lint with [semistandard](https://npmjs.com/package/semistandard) config ([@makepanic](https://github.com/makepanic)) +- [#2525](https://github.com/mochajs/mocha/issues/2525): Lint all `.js` files ([@boneskull](https://github.com/boneskull)) +- [#2524](https://github.com/mochajs/mocha/issues/2524): Provide workaround for developers unable to run browser tests on macOS Sierra ([@boneskull](https://github.com/boneskull)) + +# 3.1.0 / 2016-09-27 + +## :tada: Enhancement + +- [#2357](https://github.com/mochajs/mocha/issues/2357): Support `--inspect` on command-line ([@simov](https://github.com/simov)) +- [#2194](https://github.com/mochajs/mocha/issues/2194): Human-friendly error if no files are matched on command-line ([@Munter](https://github.com/munter)) +- [#1744](https://github.com/mochajs/mocha/issues/1744): Human-friendly error if a Suite has no callback (BDD/TDD only) ([@anton](https://github.com/anton)) + +## :bug: Bug Fix + +- [#2488](https://github.com/mochajs/mocha/issues/2488): Fix case in which _variables beginning with lowercase "D"_ may not have been reported properly as global leaks ([@JustATrick](https://github.com/JustATrick)) :laughing: +- [#2465](https://github.com/mochajs/mocha/issues/2465): Always halt execution in async function when `this.skip()` is called ([@boneskull](https://github.com/boneskull)) +- [#2445](https://github.com/mochajs/mocha/pull/2445): Exits with expected code 130 when `SIGINT` encountered; exit code can no longer rollover at 256 ([@Munter](https://github.com/munter)) +- [#2315](https://github.com/mochajs/mocha/issues/2315): Fix uncaught TypeError thrown from callback stack ([@1999](https://github.com/1999)) +- Fix broken `only()`/`skip()` in IE7/IE8 ([@boneskull](https://github.com/boneskull)) +- [#2502](https://github.com/mochajs/mocha/issues/2502): Fix broken stack trace filter on Node.js under Windows ([@boneskull](https://github.com/boneskull)) +- [#2496](https://github.com/mochajs/mocha/issues/2496): Fix diff output for objects instantiated with `String` constructor ([more](https://youtrack.jetbrains.com/issue/WEB-23383)) ([@boneskull](https://github.com/boneskull)) + +# 3.0.2 / 2016-08-08 + +## :bug: Bug Fix + +- [#2424](https://github.com/mochajs/mocha/issues/2424): Fix error loading Mocha via Require.js ([@boneskull](https://github.com/boneskull)) +- [#2417](https://github.com/mochajs/mocha/issues/2417): Fix execution of _deeply_ nested `describe.only()` suites ([@not-an-aardvark](https://github.com/not-an-aardvark)) +- Remove references to `json-cov` and `html-cov` reporters in CLI ([@boneskull](https://github.com/boneskull)) + +# 3.0.1 / 2016-08-03 + +## :bug: Bug Fix + +- [#2406](https://github.com/mochajs/mocha/issues/2406): Restore execution of nested `describe.only()` suites ([@not-an-aardvark](https://github.com/not-an-aardvark)) + +# 3.0.0 / 2016-07-31 + +## :boom: Breaking Changes + +- :warning: Due to the increasing difficulty of applying security patches made within its dependency tree, as well as looming incompatibilities with Node.js v7.0, **Mocha no longer supports Node.js v0.8**. + +- :warning: **Mocha may no longer be installed by versions of `npm` less than `1.4.0`.** Previously, this requirement only affected Mocha's development dependencies. In short, this allows Mocha to depend on packages which have dependencies fixed to major versions (`^`). + +- `.only()` is no longer "fuzzy", can be used multiple times, and generally just works like you think it should. :joy: + +- To avoid common bugs, when a test injects a callback function (suggesting asynchronous execution), calls it, _and_ returns a `Promise`, Mocha will now throw an exception: + + \```js + const assert = require('assert'); + + it('should complete this test', function (done) { + return new Promise(function (resolve) { + assert.ok(true); + resolve(); + }) + .then(done); + }); + \``` + + The above test will fail with `Error: Resolution method is overspecified. Specify a callback *or* return a Promise; not both.`. + +- When a test timeout value _greater than_ `2147483648` is specified in any context (`--timeout`, `mocha.setup()`, per-suite, per-test, etc.), the timeout will be _disabled_ and the test(s) will be allowed to run indefinitely. This is equivalent to specifying a timeout value of `0`. See [MDN](https://developer.mozilla.org/docs/Web/API/WindowTimers/setTimeout#Maximum_delay_value) for reasoning. + +- The `dot` reporter now uses more visually distinctive characters when indicating "pending" and "failed" tests. + +- Mocha no longer supports [component](https://www.npmjs.com/package/component). + +- The long-forsaken `HTMLCov` and `JSONCov` reporters--and any relationship to the "node-jscoverage" project--have been removed. + +- `spec` reporter now omits leading carriage returns (`\r`) in non-TTY environment. + +## :tada: Enhancements + +- [#808](https://github.com/mochajs/mocha/issues/808): Allow regular-expression-like strings in `--grep` and browser's `grep` querystring; enables flags such as `i` for case-insensitive matches and `u` for unicode. ([@a8m](https://github.com/a8m)) +- [#2000](https://github.com/mochajs/mocha/pull/2000): Use distinctive characters in `dot` reporter; `,` will denote a "pending" test and `!` will denote a "failing" test. ([@elliottcable](https://github.com/elliottcable)) +- [#1632](https://github.com/mochajs/mocha/issues/1632): Throw a useful exception when a suite or test lacks a title. ([@a8m](https://github.com/a8m)) +- [#1481](https://github.com/mochajs/mocha/issues/1481): Better `.only()` behavior. ([@a8m](https://github.com/a8m)) +- [#2334](https://github.com/mochajs/mocha/issues/2334): Allow `this.skip()` in async tests and hooks. ([@boneskull](https://github.com/boneskull)) +- [#1320](https://github.com/mochajs/mocha/pull/1320): Throw a useful exception when test resolution method is overspecified. ([@jugglinmike](https://github.com/jugglinmike)) +- [#2364](https://github.com/mochajs/mocha/pull/2364): Support `--preserve-symlinks`. ([@rosswarren](https://github.com/rosswarren)) + +## :bug: Bug Fixes + +- [#2259](https://github.com/mochajs/mocha/pull/2259): Restore ES3 compatibility. Specifically, support an environment lacking `Date.prototype.toISOString()`, `JSON`, or has a non-standard implementation of `JSON`. ([@ndhoule](https://github.com/ndhoule), [@boneskull](https://github.com/boneskull)) +- [#2286](https://github.com/mochajs/mocha/issues/2286): Fix `after()` failing to execute if test skipped using `this.skip()` in `beforeEach()`; no longer marks the entire suite as "pending". ([@dasilvacontin](https://github.com/dasilvacontin), [@boneskull](https://github.com/boneskull)) +- [#2208](https://github.com/mochajs/mocha/pull/2208): Fix function name display in `markdown` and `html` (browser) reporters. ([@ScottFreeCode](https://github.com/ScottFreeCode)) +- [#2299](https://github.com/mochajs/mocha/pull/2299): Fix progress bar in `html` (browser) reporter. ([@AviVahl](https://github.com/avivahl)) +- [#2307](https://github.com/mochajs/mocha/pull/2307): Fix `doc` reporter crashing when test fails. ([@jleyba](https://github.com/jleyba)) +- [#2323](https://github.com/mochajs/mocha/issues/2323): Ensure browser entry point (`browser-entry.js`) is published to npm (for use with bundlers). ([@boneskull](https://github.com/boneskull)) +- [#2310](https://github.com/mochajs/mocha/issues/2310): Ensure custom reporter with an absolute path works in Windows. ([@silentcloud](https://github.com/silentcloud)) +- [#2311](https://github.com/mochajs/mocha/issues/2311): Fix problem wherein calling `this.slow()` without a value would blast any previously set value. ([@boneskull](https://github.com/boneskull)) +- [#1813](https://github.com/mochajs/mocha/issues/1813): Ensure Mocha's own test suite will run in Windows. ([@tswaters](https://github.com/tswaters), [@TimothyGu](https://github.com/timothygu), [@boneskull](https://github.com/boneskull)) +- [#2317](https://github.com/mochajs/mocha/issues/2317): Ensure all interfaces are displayed in `--help` on CLI. ([@ScottFreeCode](https://github.com/ScottFreeCode)) +- [#1644](https://github.com/mochajs/mocha/issues/1644): Don't exhibit undefined behavior when calling `this.timeout()` with very large values ([@callumacrae](https://github.com/callumacrae), [@boneskull](https://github.com/boneskull)) +- [#2361](https://github.com/mochajs/mocha/pull/2361): Don't truncate name of thrown anonymous exception. ([@boneskull](https://github.com/boneskull)) +- [#2367](https://github.com/mochajs/mocha/pull/2367): Fix invalid CSS. ([@bensontrent](https://github.com/bensontrent)) +- [#2401](https://github.com/mochajs/mocha/pull/2401): Remove carriage return before each test line in spec reporter. ([@Munter](https://github.com/munter)) + +## :nut_and_bolt: Other + +- Upgrade production dependencies to address security advisories (and because now we can): `glob`, `commander`, `escape-string-regexp`, and `supports-color`. ([@boneskull](https://github.com/boneskull), [@RobLoach](https://github.com/robloach)) +- Add Windows to CI. ([@boneskull](https://github.com/boneskull), [@TimothyGu](https://github.com/timothygu)) +- Ensure appropriate `engines` field in `package.json`. ([@shinnn](https://github.com/shinnn), [@boneskull](https://github.com/boneskull)) +- [#2348](https://github.com/mochajs/mocha/issues/2348): Upgrade ESLint to v2 ([@anthony-redfox](https://github.com/anthony-redfox)) + +We :heart: our [backers and sponsors](https://opencollective.com/mochajs)! + +:shipit: + +# 2.5.3 / 2016-05-25 + +- [#2112](https://github.com/mochajs/mocha/pull/2112) - Fix HTML reporter regression causing duplicate error output ([@danielstjules](https://github.com/danielstjules) via [`6d24063`](https://github.com/mochajs/mocha/commit/6d24063)) +- [#2119](https://github.com/mochajs/mocha/pull/2119) - Make HTML reporter failure/passed links preventDefault to avoid SPA's hash navigation ([@jimenglish81](https://github.com/jimenglish81) via [`9e93efc`](https://github.com/mochajs/mocha/commit/9e93efc)) + +# 2.5.2 / 2016-05-24 + +- [#2178](https://github.com/mochajs/mocha/pull/2178) - Avoid double and triple xUnit XML escaping ([@graingert](https://github.com/graingert) via [`49b5ff1`](https://github.com/mochajs/mocha/commit/49b5ff1)) + +# 2.5.1 / 2016-05-23 + +- Fix [to-iso-string](https://npmjs.com/package/to-iso-string) dependency ([@boneskull](https://github.com/boneskull) via [`bd9450b`](https://github.com/mochajs/mocha/commit/bd9450b)) + +Thanks [**@entertainyou**](https://github.com/entertainyou), [**@SimenB**](https://github.com/SimenB), [**@just-paja**](https://github.com/just-paja) for the heads-up. + +# 2.5.0 / 2016-05-23 + +This has been awhile coming! We needed to feel confident that the next release wouldn't break browser compatibility (e.g. the last few patch releases). + +## Browser Tests in CI + +We now run unit tests against PhantomJS v1.x and an assortment of browsers on [SauceLabs](https://saucelabs.com), including: + +- Internet Explorer v8.0 +- Chrome (latest) +- Firefox (latest) +- Safari (latest) +- Microsoft Edge (latest) + +To accomplish this, we now run Mocha's unit tests (and a handful of integration tests) via [Karma](https://npmjs.com/package/karma) and a modified [karma-mocha](https://npmjs.com/package/karma-mocha). Along the way, we had to solve issue [#880](https://github.com/mochajs/mocha/issues/880) (apologies to [**@mderijcke**](https://github.com/mderijcke) and [**@sukima**](https://github.com/sukima) who had PRs addressing this), as well as replace most usages of [should](https://npmjs.com/package/should) with [expect.js](https://npmjs.com/package/expect.js) for IE8. + +Going forward, when sending PRs, your code will _only_ run against PhantomJS v1.x (and not hit SauceLabs) [because security](https://docs.travis-ci.com/user/pull-requests/#Security-Restrictions-when-testing-Pull-Requests). + +## Node.js 6.x + +Node.js 6.x "just worked" before, but now it's in the CI matrix, so it's "officially" supported. Mocha _still retains support_ for Node.js 0.8.x. + +## "Minor" Release + +You'll see mostly bug fixes below, but also a couple features--as such, it's a "minor" release. + +## TYVM + +Thanks to everyone who contributed, and our fabulous [sponsors and backers](https://opencollective.com/mochajs)! + +- [#2079](https://github.com/mochajs/mocha/issues/2079) - Add browser checks to CI; update [browserify](https://npmjs.com/package/browserify) to v13.0.0 ([@dasilvacontin](https://github.com/dasilvacontin), [@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull) via [`c04c1d7`](https://github.com/mochajs/mocha/commit/c04c1d7), [`0b1e9b3`](https://github.com/mochajs/mocha/commit/0b1e9b3), [`0dde0fa`](https://github.com/mochajs/mocha/commit/0dde0fa), [`f8a3d86`](https://github.com/mochajs/mocha/commit/f8a3d86), [`9e8cbaa`](https://github.com/mochajs/mocha/commit/9e8cbaa)) +- [#880](https://github.com/mochajs/mocha/issues/880) - Make Mocha browserifyable ([@boneskull](https://github.com/boneskull) via [`524862b`](https://github.com/mochajs/mocha/commit/524862b)) +- [#2121](https://github.com/mochajs/mocha/issues/2121) - Update [glob](https://npmjs.com/package/glob) to v3.2.11 ([@astorije](https://github.com/astorije) via [`7920fc4`](https://github.com/mochajs/mocha/commit/7920fc4)) +- [#2126](https://github.com/mochajs/mocha/issues/2126) - Fix dupe error messages in stack trace filter ([@Turbo87](https://github.com/Turbo87) via [`4301caa`](https://github.com/mochajs/mocha/commit/4301caa)) +- [#2109](https://github.com/mochajs/mocha/issues/2109) - Fix certain diffs when objects cannot be coerced into primitives ([@joshlory](https://github.com/joshlory) via [`61fbb7f`](https://github.com/mochajs/mocha/commit/61fbb7f)) +- [#1827](https://github.com/mochajs/mocha/pull/1827) - Fix TWBS/`mocha.css` collisions ([@irnc](https://github.com/irnc) via [`0543798`](https://github.com/mochajs/mocha/commit/0543798)) +- [#1760](https://github.com/mochajs/mocha/issues/1760), [#1936](https://github.com/mochajs/mocha/issues/1936) - Fix `this.skip()` in HTML reporter ([@mislav](https://github.com/mislav) via [`cb4248b`](https://github.com/mochajs/mocha/commit/cb4248b)) +- [#2115](https://github.com/mochajs/mocha/pull/2115) - Fix exceptions thrown from hooks in HTML reporter ([@danielstjules](https://github.com/danielstjules) via [`e290bc0`](https://github.com/mochajs/mocha/commit/e290bc0)) +- [#2089](https://github.com/mochajs/mocha/issues/2089) - Handle Symbol values in `util.stringify()` ([@ryym](https://github.com/ryym) via [`ea61d05`](https://github.com/mochajs/mocha/commit/ea61d05)) +- [#2097](https://github.com/mochajs/mocha/pull/2097) - Fix diff for objects overriding `Object.prototype.hasOwnProperty` ([@mantoni](https://github.com/mantoni) via [`b20fdfe`](https://github.com/mochajs/mocha/commit/b20fdfe)) +- [#2101](https://github.com/mochajs/mocha/pull/2101) - Properly handle non-string "messages" thrown from assertion libraries ([@jkimbo](https://github.com/jkimbo) via [`9c41051`](https://github.com/mochajs/mocha/commit/9c41051)) +- [#2124](https://github.com/mochajs/mocha/pull/2124) - Update [growl](https://npmjs.com/package/growl) ([@benjamine](https://github.com/benjamine) via [`9ae6a85`](https://github.com/mochajs/mocha/commit/9ae6a85)) +- [#2162](https://github.com/mochajs/mocha/pull/2162), [#2205](https://github.com/mochajs/mocha/pull/2205) - JSDoc fixes ([@OlegTsyba](https://github.com/OlegTsyba) via [`8031f20`](https://github.com/mochajs/mocha/commit/8031f20), [@ScottFreeCode](https://github.com/ScottFreeCode) via [`f83b1d9`](https://github.com/mochajs/mocha/commit/f83b1d9)) +- [#2132](https://github.com/mochajs/mocha/issues/2132) - Remove Growl-related cruft ([@julienw](https://github.com/julienw) via [`00d6469`](https://github.com/mochajs/mocha/commit/00d6469)) +- [#2172](https://github.com/mochajs/mocha/pull/2172) - Add [OpenCollective](https://opencollective.com) badge, sponsors & backers ([@xdamman](https://github.com/xdamman), [@boneskull](https://github.com/boneskull) via [`caee94f`](https://github.com/mochajs/mocha/commit/caee94f)) +- [#1841](https://github.com/mochajs/mocha/pull/1841) - Add new logo, banner assets ([@dasilvacontin](https://github.com/dasilvacontin) via [`00fd0e1`](https://github.com/mochajs/mocha/commit/00fd0e1)) +- [#2214](https://github.com/mochajs/mocha/pull/2214) - Update `README.md` header ([@dasilvacontin](https://github.com/dasilvacontin) via [`c0f9be2`](https://github.com/mochajs/mocha/commit/c0f9be2)) +- [#2236](https://github.com/mochajs/mocha/pull/2236) - Better checks for Node.js v0.8 compatibility in CI ([@dasilvacontin](https://github.com/dasilvacontin) via [`ba5637d`](https://github.com/mochajs/mocha/commit/ba5637d)) +- [#2239](https://github.com/mochajs/mocha/issues/2239) - Add Node.js v6.x to CI matrix ([@boneskull](https://github.com/boneskull) via [`3904da4`](https://github.com/mochajs/mocha/commit/3904da4)) + +# 2.4.5 / 2016-01-28 + +- [#2080](https://github.com/mochajs/mocha/issues/2080), [#2078](https://github.com/mochajs/mocha/issues/2078), [#2072](https://github.com/mochajs/mocha/pull/2072), [#2073](https://github.com/mochajs/mocha/pull/2073), [#1200](https://github.com/mochajs/mocha/issues/1200) - Revert changes to console colors in changeset [1192914](https://github.com/mochajs/mocha/commit/119291449cd03a11cdeda9e37cf718a69a012896) and subsequent related changes thereafter. Restores compatibility with IE8 & PhantomJS. See also [mantoni/mochify.js#129](https://github.com/mantoni/mochify.js/issues/129) and [openlayers/ol3#4746](https://github.com/openlayers/ol3/pull/4746) ([@boneskull](https://github.com/boneskull)) +- [#2082](https://github.com/mochajs/mocha/pull/2082) - Fix several test assertions ([@mislav](https://github.com/mislav)) + +# 2.4.4 / 2016-01-27 + +- [#2080](https://github.com/mochajs/mocha/issues/2080) - Fix broken RequireJS compatibility ([@boneskull](https://github.com/boneskull)) + +# 2.4.3 / 2016-01-27 + +- [#2078](https://github.com/mochajs/mocha/issues/2078) - Fix broken IE8 ([@boneskull](https://github.com/boneskull)) + +# 2.4.2 / 2016-01-26 + +- [#2053](https://github.com/mochajs/mocha/pull/2053) - Fix web worker compatibility ([@mislav](https://github.com/mislav)) +- [#2072](https://github.com/mochajs/mocha/pull/2072) - Fix Windows color output ([@thedark1337](https://github.com/thedark1337)) +- [#2073](https://github.com/mochajs/mocha/pull/2073) - Fix colors in `progress` and `landing` reporters ([@gyandeeps](https://github.com/gyandeeps)) + +# 2.4.1 / 2016-01-26 + +- [#2067](https://github.com/mochajs/mocha/pull/2067) - Fix HTML/doc reporter regressions ([@danielstjules](https://github.com/danielstjules)) + +# 2.4.0 / 2016-01-25 + +- [#1945](https://github.com/mochajs/mocha/pull/1945) - Correctly skip tests when skipping in suite's before() ([@ryanshawty](https://github.com/ryanshawty)) +- [#2056](https://github.com/mochajs/mocha/pull/2056) - chore(license): update license year to 2016 ([@pra85](https://github.com/pra85)) +- [#2048](https://github.com/mochajs/mocha/pull/2048) - Fix `this.skip` from spec with HTML reporter ([@mislav](https://github.com/mislav)) +- [#2033](https://github.com/mochajs/mocha/pull/2033) - Update tests for newer versions of should.js ([@tomhughes](https://github.com/tomhughes)) +- [#2037](https://github.com/mochajs/mocha/pull/2037) - Fix for memory leak caused by referenced to deferred test ([@bd82](https://github.com/bd82)) +- [#2038](https://github.com/mochajs/mocha/pull/2038) - Also run Travis-CI on node.js 4 & 5 ([@bd82](https://github.com/bd82)) +- [#2028](https://github.com/mochajs/mocha/pull/2028) - Remove reference to test before afterAll hook runs ([@stonelgh](https://github.com/stonelgh)) +- Bump mkdirp to 0.5.1 to support strict mode ([@danielstjules](https://github.com/danielstjules)) +- [#1977](https://github.com/mochajs/mocha/pull/1977) - safely stringify PhantomJS undefined value ([@ahamid](https://github.com/ahamid)) +- Add the ability to retry tests ([@@longlho]) +- [#1982](https://github.com/mochajs/mocha/pull/1982) - Enable --log-timer-events option [@Alaneor](https://github.com/Alaneor) +- Fix [#1980](https://github.com/mochajs/mocha/issues/1980): Load mocha.opts from bin/mocha and bin/\_mocha ([@danielstjules](https://github.com/danielstjules)) +- [#1976](https://github.com/mochajs/mocha/pull/1976) - Simplify function call ([@iclanzan](https://github.com/iclanzan)) +- [#1963](https://github.com/mochajs/mocha/pull/1963) - Add support --perf-basic-prof ([@robraux](https://github.com/robraux)) +- [#1981](https://github.com/mochajs/mocha/pull/1981) - Fix HTML reporter handling of done and exceptions ([@Standard8](https://github.com/Standard8)) +- [#1993](https://github.com/mochajs/mocha/pull/1993) - propagate "file" property for "exports" interface ([@segrey](https://github.com/segrey)) +- [#1999](https://github.com/mochajs/mocha/pull/1999) - Add support for strict mode ([@tmont](https://github.com/tmont)) +- [#2005](https://github.com/mochajs/mocha/pull/2005) - XUnit Reporter Writes to stdout, falls back to console.log ([@jonnyreeves](https://github.com/jonnyreeves)) +- [#2021](https://github.com/mochajs/mocha/pull/2021) - Fix non ES5 compliant regexp ([@zetaben](https://github.com/zetaben)) +- [#1965] - Don't double install BDD UI ([@cowboyd](https://github.com/cowboyd)) +- [#1995](https://github.com/mochajs/mocha/pull/1995) - Make sure the xunit output dir exists before writing to it ([@ianwremmel](https://github.com/ianwremmel)) +- Use chalk for the base reporter colors; closes [#1200](https://github.com/mochajs/mocha/issues/1200) ([@boneskull](https://github.com/boneskull)) +- Fix requiring custom interfaces ([@jgkim](https://github.com/jgkim)) +- [#1967](https://github.com/mochajs/mocha/pull/1967) Silence Bluebird js warnings ([@krisr](https://github.com/krisr)) + +# 2.3.4 / 2015-11-15 + +- Update debug dependency to 2.2.0 +- remove duplication of mocha.opts on process.argv +- Fix typo in test/reporters/nyan.js + +# 2.3.3 / 2015-09-19 + +- [#1875](https://github.com/mochajs/mocha/issues/1875) - Fix Markdown reporter exceeds maximum call stack size ([@danielstjules](https://github.com/danielstjules)) +- [#1864](https://github.com/mochajs/mocha/issues/1864) - Fix xunit missing output with --reporter-options output ([@danielstjules](https://github.com/danielstjules)) +- [#1846](https://github.com/mochajs/mocha/issues/1846) - Support all harmony flags ([@danielstjules](https://github.com/danielstjules)) +- Fix fragile xunit reporter spec ([@danielstjules](https://github.com/danielstjules)) +- [#1669](https://github.com/mochajs/mocha/issues/1669) - Fix catch uncaught errors outside test suite execution ([@danielstjules](https://github.com/danielstjules)) +- [#1868](https://github.com/mochajs/mocha/issues/1868) - Revert jade to support npm < v1.3.7 ([@danielstjules](https://github.com/danielstjules)) +- [#1766](https://github.com/mochajs/mocha/issues/1766) - Don't remove modules/components from stack trace in the browser ([@danielstjules](https://github.com/danielstjules)) +- [#1798](https://github.com/mochajs/mocha/issues/1798) - Fix correctly attribute mutiple done err with hooks ([@danielstjules](https://github.com/danielstjules)) +- Fix use utils.reduce for IE8 compatibility ([@wsw0108](https://github.com/wsw0108)) +- Some linting errors fixed by [@danielstjules](https://github.com/danielstjules) +- Call the inspect() function if message is not set ([@kevinburke](https://github.com/kevinburke)) + +# 2.3.2 / 2015-09-07 + +- [#1868](https://github.com/mochajs/mocha/issues/1868) - Fix compatibility with older versions of NPM ([@boneskull](https://github.com/boneskull)) + +# 2.3.1 / 2015-09-06 + +- [#1812](https://github.com/mochajs/mocha/issues/1812) - Fix: Bail flag causes before() hooks to be run even after a failure ([@aaroncrows]) + +# 2.3.0 / 2015-08-30 + +- [#553](https://github.com/mochajs/mocha/issues/553) - added --allowUncaught option ([@amsul](https://github.com/amsul)) +- [#1490](https://github.com/mochajs/mocha/issues/1490) - Allow --async-only to be satisfied by returning a promise ([@jlai](https://github.com/jlai)) +- [#1829](https://github.com/mochajs/mocha/issues/1829) - support --max-old-space-size ([@gigadude](https://github.com/gigadude)) +- [#1811](https://github.com/mochajs/mocha/issues/1811) - upgrade Jade dependency ([@outsideris](https://github.com/outsideris)) +- [#1769](https://github.com/mochajs/mocha/issues/1769) - Fix async hook error handling ([@ajaykodali](https://github.com/ajaykodali)) +- [#1230](https://github.com/mochajs/mocha/issues/1230) - More descriptive beforeEach/afterEach messages ([@duncanbeevers](https://github.com/duncanbeevers)) +- [#1787](https://github.com/mochajs/mocha/issues/1787) - Scope loading behaviour instead of using early return ([@aryeguy](https://github.com/aryeguy)) +- [#1789](https://github.com/mochajs/mocha/issues/1789) - Fix: html-runner crashing ([@sunesimonsen](https://github.com/sunesimonsen)) +- [#1749](https://github.com/mochajs/mocha/issues/1749) - Fix maximum call stack error on large amount of tests ([@tinganho](https://github.com/tinganho)) +- [#1230](https://github.com/mochajs/mocha/issues/1230) - Decorate failed hook titles with test title ([@duncanbeevers](https://github.com/duncanbeevers)) +- [#1260](https://github.com/mochajs/mocha/issues/1260) - Build using Browserify ([@ndhoule](https://github.com/ndhoule)) +- [#1728](https://github.com/mochajs/mocha/issues/1728) - Don't use `__proto__` ([@ndhoule](https://github.com/ndhoule)) +- [#1781](https://github.com/mochajs/mocha/issues/1781) - Fix hook error tests ([@glenjamin](https://github.com/glenjamin)) +- [#1754](https://github.com/mochajs/mocha/issues/1754) - Allow boolean --reporter-options ([@papandreou](https://github.com/papandreou)) +- [#1766](https://github.com/mochajs/mocha/issues/1766) - Fix overly aggressive stack suppression ([@moll](https://github.com/moll)) +- [#1752](https://github.com/mochajs/mocha/issues/1752) - Avoid potential infinite loop ([@gsilk](https://github.com/gsilk)) +- [#1761](https://github.com/mochajs/mocha/issues/1761) - Fix problems running under PhantomJS ([@chromakode](https://github.com/chromakode)) +- [#1700](https://github.com/mochajs/mocha/issues/1700) - Fix more problems running under PhantomJS ([@jbnicolai](https://github.com/jbnicolai)) +- [#1774](https://github.com/mochajs/mocha/issues/1774) - Support escaped spaces in CLI options ([@adamgruber](https://github.com/adamgruber)) +- [#1687](https://github.com/mochajs/mocha/issues/1687) - Fix HTML reporter links with special chars ([@benvinegar](https://github.com/benvinegar)) +- [#1359](https://github.com/mochajs/mocha/issues/1359) - Adopt code style and enforce it using ESLint ([@ndhoule](https://github.com/ndhoule) w/ assist from [@jbnicolai](https://github.com/jbnicolai) & [@boneskull](https://github.com/boneskull)) +- various refactors ([@jbnicolai](https://github.com/jbnicolai)) +- [#1758](https://github.com/mochajs/mocha/issues/1758) - Add cross-frame compatible Error checking ([@outdooricon](https://github.com/outdooricon)) +- [#1741](https://github.com/mochajs/mocha/issues/1741) - Remove moot `version` property from bower.json ([@kkirsche](https://github.com/kkirsche)) +- [#1739](https://github.com/mochajs/mocha/issues/1739) - Improve `HISTORY.md` ([@rstacruz](https://github.com/rstacruz)) +- [#1730](https://github.com/mochajs/mocha/issues/1730) - Support more io.js flags ([@ryedog](https://github.com/ryedog)) +- [#1349](https://github.com/mochajs/mocha/issues/1349) - Allow HTML in HTML reporter errors ([@papandreou](https://github.com/papandreou) / [@sunesimonsen](https://github.com/sunesimonsen)) +- [#1572](https://github.com/mochajs/mocha/issues/1572) - Prevent default browser behavior for failure/pass links ([@jschilli](https://github.com/jschilli)) +- [#1630](https://github.com/mochajs/mocha/issues/1630) - Support underscored harmony flags ([@dominicbarnes](https://github.com/dominicbarnes)) +- [#1718](https://github.com/mochajs/mocha/issues/1718) - Support more harmony flags ([@slyg](https://github.com/slyg)) +- [#1689](https://github.com/mochajs/mocha/issues/1689) - Add stack to JSON-stream reporter ([@jonathandelgado](https://github.com/jonathandelgado)) +- [#1654](https://github.com/mochajs/mocha/issues/1654) - Fix `ReferenceError` "location is not defined" ([@jakemmarsh](https://github.com/jakemmarsh)) + +# 2.2.5 / 2015-05-14 + +- [#1699](https://github.com/mochajs/mocha/issues/1699) - Upgrade jsdiff to v1.4.0 ([@nylen](https://github.com/nylen)) +- [#1648](https://github.com/mochajs/mocha/issues/1648) - fix diff background colors in the console ([@nylen](https://github.com/nylen)) +- [#1327](https://github.com/mochajs/mocha/issues/1327) - fix tests running twice, a regression issue. ([#1686](https://github.com/mochajs/mocha/issues/1686), [@danielstjules](https://github.com/danielstjules)) +- [#1675](https://github.com/mochajs/mocha/issues/1675) - add integration tests ([@danielstjules](https://github.com/danielstjules)) +- [#1682](https://github.com/mochajs/mocha/issues/1682) - use a valid SPDX license identifier in package.json ([@kemitchell](https://github.com/kemitchell)) +- [#1660](https://github.com/mochajs/mocha/issues/1660) - fix assertion of invalid dates ([#1661](https://github.com/mochajs/mocha/issues/1661), [@a8m](https://github.com/a8m)) +- [#1241](https://github.com/mochajs/mocha/issues/1241) - fix issue with multiline diffs appearing as single line ([#1655](https://github.com/mochajs/mocha/issues/1655), [@a8m](https://github.com/a8m)) + +# 2.2.4 / 2015-04-08 + +- Load mocha.opts in \_mocha for now (close [#1645](https://github.com/mochajs/mocha/issues/1645)) + +# 2.2.3 / 2015-04-07 + +- fix(reporter/base): string diff - issue [#1241](https://github.com/mochajs/mocha/issues/1241) +- fix(reporter/base): string diff - issue [#1241](https://github.com/mochajs/mocha/issues/1241) +- fix(reporter/base): don't show diffs for errors without expectation +- fix(reporter/base): don't assume error message is first line of stack +- improve: dry up reporter/base test +- fix(reporter/base): explicitly ignore showDiff [#1614](https://github.com/mochajs/mocha/issues/1614) +- Add iojs to travis build +- Pass `--allow-natives-syntax` flag to node. +- Support --harmony_classes flag for io.js +- Fix 1556: Update utils.clean to handle newlines in func declarations +- Fix 1606: fix err handling in IE <= 8 and non-ES5 browsers +- Fix 1585: make \_mocha executable again +- chore(package.json): add a8m as a contributor +- Fixed broken link on html-cov reporter +- support --es_staging flag +- fix issue where menu overlaps content. +- update contributors in package.json +- Remove trailing whitespace from reporter output +- Remove contributors list from readme +- log third-party reporter errors +- [Fix] Exclude not own properties when looping on options +- fix: support node args in mocha.opts (close [#1573](https://github.com/mochajs/mocha/issues/1573)) +- fix(reporter/base): string diff - issue [#1241](https://github.com/mochajs/mocha/issues/1241) + +# 2.2.1 / 2015-03-09 + +- Fix passing of args intended for node/iojs. + +# 2.2.0 / 2015-03-06 + +- Update mocha.js +- Add --fgrep. Use grep for RegExp, fgrep for str +- Ignore async global errors after spec resolution +- Fixing errors that prevent mocha.js from loading in the browser - fixes [#1558](https://github.com/mochajs/mocha/issues/1558) +- fix(utils): issue [#1558](https://github.com/mochajs/mocha/issues/1558) + make +- add ability to delay root suite; closes [#362](https://github.com/mochajs/mocha/issues/362), closes [#1124](https://github.com/mochajs/mocha/issues/1124) +- fix insanity in http tests +- update travis: add node 0.12, add gitter, remove slack +- building +- resolve [#1548](https://github.com/mochajs/mocha/issues/1548): ensure the environment's "node" executable is used +- reporters/base: use supports-color to detect colorable term +- travis: use docker containers +- small fix: commander option for --expose-gc +- Ignore asynchronous errors after global failure +- Improve error output when a test fails with a non-error +- updated travis badge, uses svg instead of img +- Allow skip from test context for [#332](https://github.com/mochajs/mocha/issues/332) +- [JSHINT] Unnecessary semicolon fixed in bin/\_mocha +- Added a reminder about the done() callback to test timeout error messages +- fixes [#1496](https://github.com/mochajs/mocha/issues/1496), in Mocha.run(fn), check if fn exists before executing it, added tests too +- Add Harmony Proxy flag for iojs +- test(utils|ms|\*): test existing units +- add support for some iojs flags +- fix(utils.stringify): issue [#1229](https://github.com/mochajs/mocha/issues/1229), diff viewer +- Remove slack link +- Prevent multiple 'grep=' querystring params in html reporter +- Use grep as regexp (close [#1381](https://github.com/mochajs/mocha/issues/1381)) +- utils.stringify should handle objects without an Object prototype +- in runnable test, comparing to undefined error's message rather than a literal +- Fix test running output truncation on async STDIO +- amended for deprecated customFds option in child_process + +# 2.1.0 / 2014-12-23 + +- showDiff: don’t stringify strings +- Clean up unused module dependencies. +- Filter zero-length strings from mocha.opts +- only write to stdout in reporters +- Revert "only write to stdout in reporters" +- Print colored output only to a tty +- update summary in README.md +- rename Readme.md/History.md to README.md/HISTORY.md because neurotic +- add .mailmap to fix "git shortlog" or "git summary" output +- fixes [#1461](https://github.com/mochajs/mocha/issues/1461): nyan-reporter now respects Base.useColors, fixed bug where Base.color would not return a string when str wasn't a string. +- Use existing test URL builder in failed replay links +- modify .travis.yml: use travis_retry; closes [#1449](https://github.com/mochajs/mocha/issues/1449) +- fix -t 0 behavior; closes [#1446](https://github.com/mochajs/mocha/issues/1446) +- fix tests (whoops) +- improve diff behavior +- Preserve pathname when linking to individual tests +- Fix test +- Tiny typo in comments fixed +- after hooks now being called on failed tests when using bail, fixes [#1093](https://github.com/mochajs/mocha/issues/1093) +- fix throwing undefined/null now makes tests fail, fixes [#1395](https://github.com/mochajs/mocha/issues/1395) +- compiler extensions are added as watched extensions, removed non-standard extensions from watch regex, resolves [#1221](https://github.com/mochajs/mocha/issues/1221) +- prefix/namespace for suite titles in markdown reporter, fixes [#554](https://github.com/mochajs/mocha/issues/554) +- fix more bad markdown in CONTRIBUTING.md +- fix bad markdown in CONTRIBUTING.md +- add setImmediate/clearImmediate to globals; closes [#1435](https://github.com/mochajs/mocha/issues/1435) +- Fix buffer diffs (closes [#1132](https://github.com/mochajs/mocha/issues/1132), closes [#1433](https://github.com/mochajs/mocha/issues/1433)) +- add a CONTRIBUTING.md. closes [#882](https://github.com/mochajs/mocha/issues/882) +- fix intermittent build failures (maybe). closes [#1407](https://github.com/mochajs/mocha/issues/1407) +- add Slack notification to .travis.yml +- Fix slack link +- Add slack room to readme +- Update maintainers +- update maintainers and contributors +- resolves [#1393](https://github.com/mochajs/mocha/issues/1393): kill children with more effort on SIGINT +- xunit reporter support for optionally writing to a file +- if a reporter has a .done method, call it before exiting +- add support for reporter options +- only write to stdout in reporters + +# 2.0.0 / 2014-10-21 + +- remove: support for node 0.6.x, 0.4.x +- fix: landing reporter with non ansi characters ([#211](https://github.com/mochajs/mocha/issues/211)) +- fix: html reporter - preserve query params when navigating to suites/tests ([#1358](https://github.com/mochajs/mocha/issues/1358)) +- fix: json stream reporter add error message to failed test +- fix: fixes for visionmedia -> mochajs +- fix: use stdio, fixes node deprecation warnings ([#1391](https://github.com/mochajs/mocha/issues/1391)) + +# 1.21.5 / 2014-10-11 + +- fix: build for NodeJS v0.6.x +- fix: do not attempt to highlight syntax when non-HTML reporter is used +- update: escape-string-regexp to 1.0.2. +- fix: botched indentation in canonicalize() +- fix: .gitignore: ignore .patch and .diff files +- fix: changed 'Catched' to 'Caught' in uncaught exception error handler messages +- add: `pending` field for json reporter +- fix: Runner.prototype.uncaught: don't double-end runnables that already have a state. +- fix: --recursive, broken by [`f0facd2`](https://github.com/mochajs/mocha/commit/f0facd2e) +- update: replaces escapeRegexp with the escape-string-regexp package. +- update: commander to 2.3.0. +- update: diff to 1.0.8. +- fix: ability to disable syntax highlighting ([#1329](https://github.com/mochajs/mocha/issues/1329)) +- fix: added empty object to errorJSON() call to catch when no error is present +- fix: never time out after calling enableTimeouts(false) +- fix: timeout(0) will work at suite level ([#1300](https://github.com/mochajs/mocha/issues/1300)) +- Fix for --watch+only() issue ([#888](https://github.com/mochajs/mocha/issues/888) ) +- fix: respect err.showDiff, add Base reporter test ([#810](https://github.com/mochajs/mocha/issues/810)) + +# 1.22.1-3 / 2014-07-27 + +- fix: disabling timeouts with this.timeout(0) ([#1301](https://github.com/mochajs/mocha/issues/1301)) + +# 1.22.1-3 / 2014-07-27 + +- fix: local uis and reporters ([#1288](https://github.com/mochajs/mocha/issues/1288)) +- fix: building 1.21.0's changes in the browser ([#1284](https://github.com/mochajs/mocha/issues/1284)) + +# 1.21.0 / 2014-07-23 + +- add: --no-timeouts option ([#1262](https://github.com/mochajs/mocha/issues/1262), [#1268](https://github.com/mochajs/mocha/issues/1268)) +- add: --\*- deprecation node flags ([#1217](https://github.com/mochajs/mocha/issues/1217)) +- add: --watch-extensions argument ([#1247](https://github.com/mochajs/mocha/issues/1247)) +- change: spec reporter is default ([#1228](https://github.com/mochajs/mocha/issues/1228)) +- fix: diff output showing incorrect +/- ([#1182](https://github.com/mochajs/mocha/issues/1182)) +- fix: diffs of circular structures ([#1179](https://github.com/mochajs/mocha/issues/1179)) +- fix: re-render the progress bar when progress has changed only ([#1151](https://github.com/mochajs/mocha/issues/1151)) +- fix support for environments with global and window ([#1159](https://github.com/mochajs/mocha/issues/1159)) +- fix: reverting to previously defined onerror handler ([#1178](https://github.com/mochajs/mocha/issues/1178)) +- fix: stringify non error objects passed to done() ([#1270](https://github.com/mochajs/mocha/issues/1270)) +- fix: using local ui, reporters ([#1267](https://github.com/mochajs/mocha/issues/1267)) +- fix: cleaning es6 arrows ([#1176](https://github.com/mochajs/mocha/issues/1176)) +- fix: don't include attrs in failure tag for xunit ([#1244](https://github.com/mochajs/mocha/issues/1244)) +- fix: fail tests that return a promise if promise is rejected w/o a reason ([#1224](https://github.com/mochajs/mocha/issues/1224)) +- fix: showing failed tests in doc reporter ([#1117](https://github.com/mochajs/mocha/issues/1117)) +- fix: dot reporter dots being off ([#1204](https://github.com/mochajs/mocha/issues/1204)) +- fix: catch empty throws ([#1219](https://github.com/mochajs/mocha/issues/1219)) +- fix: honoring timeout for sync operations ([#1242](https://github.com/mochajs/mocha/issues/1242)) +- update: growl to 1.8.0 + +# 1.20.1 / 2014-06-03 + +- update: should dev dependency to ~4.0.0 ([#1231](https://github.com/mochajs/mocha/issues/1231)) + +# 1.20.0 / 2014-05-28 + +- add: filenames to suite objects ([#1222](https://github.com/mochajs/mocha/issues/1222)) + +# 1.19.0 / 2014-05-17 + +- add: browser script option to package.json +- add: export file in Mocha.Test objects ([#1174](https://github.com/mochajs/mocha/issues/1174)) +- add: add docs for wrapped node flags +- fix: mocha.run() to return error status in browser ([#1216](https://github.com/mochajs/mocha/issues/1216)) +- fix: clean() to show failure details ([#1205](https://github.com/mochajs/mocha/issues/1205)) +- fix: regex that generates html for new keyword ([#1201](https://github.com/mochajs/mocha/issues/1201)) +- fix: sibling suites have inherited but separate contexts ([#1164](https://github.com/mochajs/mocha/issues/1164)) + +# 1.18.2 / 2014-03-18 + +- fix: html runner was prevented from using #mocha as the default root el ([#1162](https://github.com/mochajs/mocha/issues/1162)) + +# 1.18.1 / 2014-03-18 + +- fix: named before/after hooks in bdd, tdd, qunit interfaces ([#1161](https://github.com/mochajs/mocha/issues/1161)) + +# 1.18.0 / 2014-03-13 + +- add: promise support ([#329](https://github.com/mochajs/mocha/issues/329)) +- add: named before/after hooks ([#966](https://github.com/mochajs/mocha/issues/966)) + +# 1.17.1 / 2014-01-22 + +- fix: expected messages in should.js (should.js#168) +- fix: expect errno global in node versions < v0.9.11 ([#1111](https://github.com/mochajs/mocha/issues/1111)) +- fix: unreliable checkGlobals optimization ([#1110](https://github.com/mochajs/mocha/issues/1110)) + +# 1.17.0 / 2014-01-09 + +- add: able to require globals (describe, it, etc.) through mocha ([#1077](https://github.com/mochajs/mocha/issues/1077)) +- fix: abort previous run on --watch change ([#1100](https://github.com/mochajs/mocha/issues/1100)) +- fix: reset context for each --watch triggered run ([#1099](https://github.com/mochajs/mocha/issues/1099)) +- fix: error when cli can't resolve path or pattern ([#799](https://github.com/mochajs/mocha/issues/799)) +- fix: canonicalize objects before stringifying and diffing them ([#1079](https://github.com/mochajs/mocha/issues/1079)) +- fix: make CR call behave like carriage return for non tty ([#1087](https://github.com/mochajs/mocha/issues/1087)) + +# 1.16.2 / 2013-12-23 + +- fix: couple issues with ie 8 ([#1082](https://github.com/mochajs/mocha/issues/1082), [#1081](https://github.com/mochajs/mocha/issues/1081)) +- fix: issue running the xunit reporter in browsers ([#1068](https://github.com/mochajs/mocha/issues/1068)) +- fix: issue with firefox < 3.5 ([#725](https://github.com/mochajs/mocha/issues/725)) + +# 1.16.1 / 2013-12-19 + +- fix: recompiled for missed changes from the last release + +# 1.16.0 / 2013-12-19 + +- add: Runnable.globals(arr) for per test global whitelist ([#1046](https://github.com/mochajs/mocha/issues/1046)) +- add: mocha.throwError(err) for assertion libs to call ([#985](https://github.com/mochajs/mocha/issues/985)) +- remove: --watch's spinner ([#806](https://github.com/mochajs/mocha/issues/806)) +- fix: duplicate test output for multi-line specs in spec reporter ([#1006](https://github.com/mochajs/mocha/issues/1006)) +- fix: gracefully exit on SIGINT ([#1063](https://github.com/mochajs/mocha/issues/1063)) +- fix expose the specified ui only in the browser ([#984](https://github.com/mochajs/mocha/issues/984)) +- fix: ensure process exit code is preserved when using --no-exit ([#1059](https://github.com/mochajs/mocha/issues/1059)) +- fix: return true from window.onerror handler ([#868](https://github.com/mochajs/mocha/issues/868)) +- fix: xunit reporter to use process.stdout.write ([#1068](https://github.com/mochajs/mocha/issues/1068)) +- fix: utils.clean(str) indentation ([#761](https://github.com/mochajs/mocha/issues/761)) +- fix: xunit reporter returning test duration a NaN ([#1039](https://github.com/mochajs/mocha/issues/1039)) + +# 1.15.1 / 2013-12-03 + +- fix: recompiled for missed changes from the last release + +# 1.15.0 / 2013-12-02 + +- add: `--no-exit` to prevent `process.exit()` ([#1018](https://github.com/mochajs/mocha/issues/1018)) +- fix: using inline diffs ([#1044](https://github.com/mochajs/mocha/issues/1044)) +- fix: show pending test details in xunit reporter ([#1051](https://github.com/mochajs/mocha/issues/1051)) +- fix: faster global leak detection ([#1024](https://github.com/mochajs/mocha/issues/1024)) +- fix: yui compression ([#1035](https://github.com/mochajs/mocha/issues/1035)) +- fix: wrapping long lines in test results ([#1030](https://github.com/mochajs/mocha/issues/1030), [#1031](https://github.com/mochajs/mocha/issues/1031)) +- fix: handle errors in hooks ([#1043](https://github.com/mochajs/mocha/issues/1043)) + +# 1.14.0 / 2013-11-02 + +- add: unified diff ([#862](https://github.com/mochajs/mocha/issues/862)) +- add: set MOCHA_COLORS env var to use colors ([#965](https://github.com/mochajs/mocha/issues/965)) +- add: able to override tests links in html reporters ([#776](https://github.com/mochajs/mocha/issues/776)) +- remove: teamcity reporter ([#954](https://github.com/mochajs/mocha/issues/954)) +- update: commander dependency to 2.0.0 ([#1010](https://github.com/mochajs/mocha/issues/1010)) +- fix: mocha --ui will try to require the ui if not built in, as --reporter does ([#1022](https://github.com/mochajs/mocha/issues/1022)) +- fix: send cursor commands only if isatty ([#184](https://github.com/mochajs/mocha/issues/184), [#1003](https://github.com/mochajs/mocha/issues/1003)) +- fix: include assertion message in base reporter ([#993](https://github.com/mochajs/mocha/issues/993), [#991](https://github.com/mochajs/mocha/issues/991)) +- fix: consistent return of it, it.only, and describe, describe.only ([#840](https://github.com/mochajs/mocha/issues/840)) + +# 1.13.0 / 2013-09-15 + +- add: sort test files with --sort ([#813](https://github.com/mochajs/mocha/issues/813)) +- update: diff dependency to 1.0.7 +- update: glob dependency to 3.2.3 ([#927](https://github.com/mochajs/mocha/issues/927)) +- fix: diffs show whitespace differences ([#976](https://github.com/mochajs/mocha/issues/976)) +- fix: improve global leaks ([#783](https://github.com/mochajs/mocha/issues/783)) +- fix: firefox window.getInterface leak +- fix: accessing iframe via window[iframeIndex] leak +- fix: faster global leak checking +- fix: reporter pending css selector ([#970](https://github.com/mochajs/mocha/issues/970)) + +# 1.12.1 / 2013-08-29 + +- remove test.js from .gitignore +- update included version of ms.js + +# 1.12.0 / 2013-07-01 + +- add: prevent diffs for differing types. Closes [#900](https://github.com/mochajs/mocha/issues/900) +- add `Mocha.process` hack for phantomjs +- fix: use compilers with requires +- fix regexps in diffs. Closes [#890](https://github.com/mochajs/mocha/issues/890) +- fix xunit NaN on failure. Closes [#894](https://github.com/mochajs/mocha/issues/894) +- fix: strip tab indentation in `clean` utility method +- fix: textmate bundle installation + +# 1.11.0 / 2013-06-12 + +- add --prof support +- add --harmony support +- add --harmony-generators support +- add "Uncaught " prefix to uncaught exceptions +- add web workers support +- add `suite.skip()` +- change to output # of pending / passing even on failures. Closes [#872](https://github.com/mochajs/mocha/issues/872) +- fix: prevent hooks from being called if we are bailing +- fix `this.timeout(0)` + +# 1.10.0 / 2013-05-21 + +- add add better globbing support for windows via `glob` module +- add support to pass through flags such as --debug-brk=1234. Closes [#852](https://github.com/mochajs/mocha/issues/852) +- add test.only, test.skip to qunit interface +- change to always use word-based diffs for now. Closes [#733](https://github.com/mochajs/mocha/issues/733) +- change `mocha init` tests.html to index.html +- fix `process` global leak in the browser +- fix: use resolve() instead of join() for --require +- fix: filterLeaks() condition to not consider indices in global object as leaks +- fix: restrict mocha.css styling to #mocha id +- fix: save timer references to avoid Sinon interfering in the browser build. + +# 1.9.0 / 2013-04-03 + +- add improved setImmediate implementation +- replace --ignore-leaks with --check-leaks +- change default of ignoreLeaks to true. Closes [#791](https://github.com/mochajs/mocha/issues/791) +- remove scrolling for HTML reporter +- fix retina support +- fix tmbundle, restrict to js scope + +# 1.8.2 / 2013-03-11 + +- add `setImmediate` support for 0.10.x +- fix mocha -w spinner on windows + +# 1.8.1 / 2013-01-09 + +- fix .bail() arity check causing it to default to true + +# 1.8.0 / 2013-01-08 + +- add Mocha() options bail support +- add `Mocha#bail()` method +- add instanceof check back for inheriting from Error +- add component.json +- add diff.js to browser build +- update growl +- fix TAP reporter failures comment :D + +# 1.7.4 / 2012-12-06 + +- add total number of passes and failures to TAP +- remove .bind() calls. re [#680](https://github.com/mochajs/mocha/issues/680) +- fix indexOf. Closes [#680](https://github.com/mochajs/mocha/issues/680) + +# 1.7.3 / 2012-11-30 + +- fix uncaught error support for the browser +- revert uncaught "fix" which breaks node + +# 1.7.2 / 2012-11-28 + +- fix uncaught errors to expose the original error message + +# 1.7.0 / 2012-11-07 + +- add `--async-only` support to prevent false positives for missing `done()` +- add sorting by filename in code coverage +- add HTML 5 doctype to browser template. +- add play button to html reporter to rerun a single test +- add `this.timeout(ms)` as Suite#timeout(ms). Closes [#599](https://github.com/mochajs/mocha/issues/599) +- update growl dependency to 1.6.x +- fix encoding of test-case ?grep. Closes [#637](https://github.com/mochajs/mocha/issues/637) +- fix unicode chars on windows +- fix dom globals in Opera/IE. Closes [#243](https://github.com/mochajs/mocha/issues/243) +- fix markdown reporter a tags +- fix `this.timeout("5s")` support + +# 1.6.0 / 2012-10-02 + +- add object diffs when `err.showDiff` is present +- add hiding of empty suites when pass/failures are toggled +- add faster `.length` checks to `checkGlobals()` before performing the filter + +# 1.5.0 / 2012-09-21 + +- add `ms()` to `.slow()` and `.timeout()` +- add `Mocha#checkLeaks()` to re-enable global leak checks +- add `this.slow()` option [aheckmann] +- add tab, CR, LF to error diffs for now +- add faster `.checkGlobals()` solution [guille] +- remove `fn.call()` from reduce util +- remove `fn.call()` from filter util +- fix forEach. Closes [#582](https://github.com/mochajs/mocha/issues/582) +- fix relaying of signals [TooTallNate] +- fix TAP reporter grep number + +# 1.4.2 / 2012-09-01 + +- add support to multiple `Mocha#globals()` calls, and strings +- add `mocha.reporter()` constructor support [jfirebaugh] +- add `mocha.timeout()` +- move query-string parser to utils.js +- move highlight code to utils.js +- fix third-party reporter support [exogen] +- fix client-side API to match node-side [jfirebaugh] +- fix mocha in iframe [joliss] + +# 1.4.1 / 2012-08-28 + +- add missing `Markdown` export +- fix `Mocha#grep()`, escape regexp strings +- fix reference error when `devicePixelRatio` is not defined. Closes [#549](https://github.com/mochajs/mocha/issues/549) + +# 1.4.0 / 2012-08-22 + +- add mkdir -p to `mocha init`. Closes [#539](https://github.com/mochajs/mocha/issues/539) +- add `.only()`. Closes [#524](https://github.com/mochajs/mocha/issues/524) +- add `.skip()`. Closes [#524](https://github.com/mochajs/mocha/issues/524) +- change str.trim() to use utils.trim(). Closes [#533](https://github.com/mochajs/mocha/issues/533) +- fix HTML progress indicator retina display +- fix url-encoding of click-to-grep HTML functionality + +# 1.3.2 / 2012-08-01 + +- fix exports double-execution regression. Closes [#531](https://github.com/mochajs/mocha/issues/531) + +# 1.3.1 / 2012-08-01 + +- add passes/failures toggling to HTML reporter +- add pending state to `xit()` and `xdescribe()` [Brian Moore] +- add the [**@charset**](https://github.com/charset) "UTF-8"; to fix [#522](https://github.com/mochajs/mocha/issues/522) with FireFox. [Jonathan Creamer] +- add border-bottom to #stats links +- add check for runnable in `Runner#uncaught()`. Closes [#494](https://github.com/mochajs/mocha/issues/494) +- add 0.4 and 0.6 back to travis.yml +- add `-E, --growl-errors` to growl on failures only +- add prefixes to debug() names. Closes [#497](https://github.com/mochajs/mocha/issues/497) +- add `Mocha#invert()` to js api +- change dot reporter to use sexy unicode dots +- fix error when clicking pending test in HTML reporter +- fix `make tm` + +# 1.3.0 / 2012-07-05 + +- add window scrolling to `HTML` reporter +- add v8 `--trace-*` option support +- add support for custom reports via `--reporter MODULE` +- add `--invert` switch to invert `--grep` matches +- fix export of `Nyan` reporter. Closes [#495](https://github.com/mochajs/mocha/issues/495) +- fix escaping of `HTML` suite titles. Closes [#486](https://github.com/mochajs/mocha/issues/486) +- fix `done()` called multiple times with an error test +- change `--grep` - regexp escape the input + +# 1.2.2 / 2012-06-28 + +- Added 0.8.0 support + +# 1.2.1 / 2012-06-25 + +- Added `this.test.error(err)` support to after each hooks. Closes [#287](https://github.com/mochajs/mocha/issues/287) +- Added: export top-level suite on global mocha object (mocha.suite). Closes [#448](https://github.com/mochajs/mocha/issues/448) +- Fixed `js` code block format error in markdown reporter +- Fixed deprecation warning when using `path.existsSync` +- Fixed --globals with wildcard +- Fixed chars in nyan when his head moves back +- Remove `--growl` from test/mocha.opts. Closes [#289](https://github.com/mochajs/mocha/issues/289) + +# 1.2.0 / 2012-06-17 + +- Added `nyan` reporter [Atsuya Takagi] +- Added `mocha init ` to copy client files +- Added "specify" synonym for "it" [domenic] +- Added global leak wildcard support [nathanbowser] +- Fixed runner emitter leak. closes [#432](https://github.com/mochajs/mocha/issues/432) +- Fixed omission of .js extension. Closes [#454](https://github.com/mochajs/mocha/issues/454) + +# 1.1.0 / 2012-05-30 + +- Added: check each `mocha(1)` arg for directories to walk +- Added `--recursive` [tricknotes] +- Added `context` for BDD [hokaccha] +- Added styling for new clickable titles +- Added clickable suite titles to HTML reporter +- Added warning when strings are thrown as errors +- Changed: green arrows again in HTML reporter styling +- Changed ul/li elements instead of divs for better copy-and-pasting [joliss] +- Fixed issue [#325](https://github.com/mochajs/mocha/issues/325) - add better grep support to js api +- Fixed: save timer references to avoid Sinon interfering. + +# 1.0.3 / 2012-04-30 + +- Fixed string diff newlines +- Fixed: removed mocha.css target. Closes [#401](https://github.com/mochajs/mocha/issues/401) + +# 1.0.2 / 2012-04-25 + +- Added HTML reporter duration. Closes [#47](https://github.com/mochajs/mocha/issues/47) +- Fixed: one postMessage event listener [exogen] +- Fixed: allow --globals to be used multiple times. Closes [#100](https://github.com/mochajs/mocha/issues/100) [brendannee] +- Fixed [#158](https://github.com/mochajs/mocha/issues/158): removes jquery include from browser tests +- Fixed grep. Closes [#372](https://github.com/mochajs/mocha/issues/372) [brendannee] +- Fixed [#166](https://github.com/mochajs/mocha/issues/166) - When grepping don't display the empty suites +- Removed test/browser/style.css. Closes [#385](https://github.com/mochajs/mocha/issues/385) + +# 1.0.1 / 2012-04-04 + +- Fixed `.timeout()` in hooks +- Fixed: allow callback for `mocha.run()` in client version +- Fixed browser hook error display. Closes [#361](https://github.com/mochajs/mocha/issues/361) + +# 1.0.0 / 2012-03-24 + +- Added js API. Closes [#265](https://github.com/mochajs/mocha/issues/265) +- Added: initial run of tests with `--watch`. Closes [#345](https://github.com/mochajs/mocha/issues/345) +- Added: mark `location` as a global on the CS. Closes [#311](https://github.com/mochajs/mocha/issues/311) +- Added `markdown` reporter (github flavour) +- Added: scrolling menu to coverage.html. Closes [#335](https://github.com/mochajs/mocha/issues/335) +- Added source line to html report for Safari [Tyson Tate] +- Added "min" reporter, useful for `--watch` [Jakub Nešetřil] +- Added support for arbitrary compilers via . Closes [#338](https://github.com/mochajs/mocha/issues/338) [Ian Young] +- Added Teamcity export to lib/reporters/index [Michael Riley] +- Fixed chopping of first char in error reporting. Closes [#334](https://github.com/mochajs/mocha/issues/334) [reported by topfunky] +- Fixed terrible FF / Opera stack traces + +# 0.14.1 / 2012-03-06 + +- Added lib-cov to _.npmignore_ +- Added reporter to `mocha.run([reporter])` as argument +- Added some margin-top to the HTML reporter +- Removed jQuery dependency +- Fixed `--watch`: purge require cache. Closes [#266](https://github.com/mochajs/mocha/issues/266) + +# 0.14.0 / 2012-03-01 + +- Added string diff support for terminal reporters + +# 0.13.0 / 2012-02-23 + +- Added preliminary test coverage support. Closes [#5](https://github.com/mochajs/mocha/issues/5) +- Added `HTMLCov` reporter +- Added `JSONCov` reporter [kunklejr] +- Added `xdescribe()` and `xit()` to the BDD interface. Closes [#263](https://github.com/mochajs/mocha/issues/263) (docs \* Changed: make json reporter output pretty json +- Fixed node-inspector support, swapped `--debug` for `debug` to match node. Closes [#247](https://github.com/mochajs/mocha/issues/247) + +# 0.12.1 / 2012-02-14 + +- Added `npm docs mocha` support [TooTallNate] +- Added a `Context` object used for hook and test-case this. Closes [#253](https://github.com/mochajs/mocha/issues/253) +- Fixed `Suite#clone()` `.ctx` reference. Closes [#262](https://github.com/mochajs/mocha/issues/262) + +# 0.12.0 / 2012-02-02 + +- Added .coffee `--watch` support. Closes [#242](https://github.com/mochajs/mocha/issues/242) +- Added support to `--require` files relative to the CWD. Closes [#241](https://github.com/mochajs/mocha/issues/241) +- Added quick n dirty syntax highlighting. Closes [#248](https://github.com/mochajs/mocha/issues/248) +- Changed: made HTML progress indicator smaller +- Fixed xunit errors attribute [dhendo] + +# 0.10.2 / 2012-01-21 + +- Fixed suite count in reporter stats. Closes [#222](https://github.com/mochajs/mocha/issues/222) +- Fixed `done()` after timeout error reporting [Phil Sung] +- Changed the 0-based errors to 1 + +# 0.10.1 / 2012-01-17 + +- Added support for node 0.7.x +- Fixed absolute path support. Closes [#215](https://github.com/mochajs/mocha/issues/215) [kompiro] +- Fixed `--no-colors` option [Jussi Virtanen] +- Fixed Arial CSS typo in the correct file + +# 0.10.0 / 2012-01-13 + +- Added `-b, --bail` to exit on first exception [guillermo] +- Added support for `-gc` / `--expose-gc` [TooTallNate] +- Added `qunit`-inspired interface +- Added MIT LICENSE. Closes [#194](https://github.com/mochajs/mocha/issues/194) +- Added: `--watch` all .js in the CWD. Closes [#139](https://github.com/mochajs/mocha/issues/139) +- Fixed `self.test` reference in runner. Closes [#189](https://github.com/mochajs/mocha/issues/189) +- Fixed double reporting of uncaught exceptions after timeout. Closes [#195](https://github.com/mochajs/mocha/issues/195) + +# 0.8.2 / 2012-01-05 + +- Added test-case context support. Closes [#113](https://github.com/mochajs/mocha/issues/113) +- Fixed exit status. Closes [#187](https://github.com/mochajs/mocha/issues/187) +- Update commander. Closes [#190](https://github.com/mochajs/mocha/issues/190) + +# 0.8.1 / 2011-12-30 + +- Fixed reporting of uncaught exceptions. Closes [#183](https://github.com/mochajs/mocha/issues/183) +- Fixed error message defaulting [indutny] +- Changed mocha(1) from bash to node for windows [Nathan Rajlich] + +# 0.8.0 / 2011-12-28 + +- Added `XUnit` reporter [FeeFighters/visionmedia] +- Added `say(1)` notification support [Maciej Małecki] +- Changed: fail when done() is invoked with a non-Error. Closes [#171](https://github.com/mochajs/mocha/issues/171) +- Fixed `err.stack`, defaulting to message. Closes [#180](https://github.com/mochajs/mocha/issues/180) +- Fixed: `make tm` mkdir -p the dest. Closes [#137](https://github.com/mochajs/mocha/issues/137) +- Fixed mocha(1) --help bin name +- Fixed `-d` for `--debug` support + +# 0.7.1 / 2011-12-22 + +- Removed `mocha-debug(1)`, use `mocha --debug` +- Fixed CWD relative requires +- Fixed growl issue on windows [Raynos] +- Fixed: platform specific line endings [TooTallNate] +- Fixed: escape strings in HTML reporter. Closes [#164](https://github.com/mochajs/mocha/issues/164) + +# 0.7.0 / 2011-12-18 + +- Added support for IE{7,8} [guille] +- Changed: better browser nextTick implementation [guille] + +# 0.6.0 / 2011-12-18 + +- Added setZeroTimeout timeout for browser (nicer stack traces). Closes [#153](https://github.com/mochajs/mocha/issues/153) +- Added "view source" on hover for HTML reporter to make it obvious +- Changed: replace custom growl with growl lib +- Fixed duplicate reporting for HTML reporter. Closes [#154](https://github.com/mochajs/mocha/issues/154) +- Fixed silent hook errors in the HTML reporter. Closes [#150](https://github.com/mochajs/mocha/issues/150) + +# 0.5.0 / 2011-12-14 + +- Added: push node_modules directory onto module.paths for relative require Closes [#93](https://github.com/mochajs/mocha/issues/93) +- Added teamcity reporter [blindsey] +- Fixed: recover from uncaught exceptions for tests. Closes [#94](https://github.com/mochajs/mocha/issues/94) +- Fixed: only emit "test end" for uncaught within test, not hook + +# 0.4.0 / 2011-12-14 + +- Added support for test-specific timeouts via `this.timeout(0)`. Closes [#134](https://github.com/mochajs/mocha/issues/134) +- Added guillermo's client-side EventEmitter. Closes [#132](https://github.com/mochajs/mocha/issues/132) +- Added progress indicator to the HTML reporter +- Fixed slow browser tests. Closes [#135](https://github.com/mochajs/mocha/issues/135) +- Fixed "suite" color for light terminals +- Fixed `require()` leak spotted by [guillermo] + +# 0.3.6 / 2011-12-09 + +- Removed suite merging (for now) + +# 0.3.5 / 2011-12-08 + +- Added support for `window.onerror` [guillermo] +- Fixed: clear timeout on uncaught exceptions. Closes [#131](https://github.com/mochajs/mocha/issues/131) [guillermo] +- Added `mocha.css` to PHONY list. +- Added `mocha.js` to PHONY list. + +# 0.3.4 / 2011-12-08 + +- Added: allow `done()` to be called with non-Error +- Added: return Runner from `mocha.run()`. Closes [#126](https://github.com/mochajs/mocha/issues/126) +- Fixed: run afterEach even on failures. Closes [#125](https://github.com/mochajs/mocha/issues/125) +- Fixed clobbering of current runnable. Closes [#121](https://github.com/mochajs/mocha/issues/121) + +# 0.3.3 / 2011-12-08 + +- Fixed hook timeouts. Closes [#120](https://github.com/mochajs/mocha/issues/120) +- Fixed uncaught exceptions in hooks + +# 0.3.2 / 2011-12-05 + +- Fixed weird reporting when `err.message` is not present + +# 0.3.1 / 2011-12-04 + +- Fixed hook event emitter leak. Closes [#117](https://github.com/mochajs/mocha/issues/117) +- Fixed: export `Spec` constructor. Closes [#116](https://github.com/mochajs/mocha/issues/116) + +# 0.3.0 / 2011-12-04 + +- Added `-w, --watch`. Closes [#72](https://github.com/mochajs/mocha/issues/72) +- Added `--ignore-leaks` to ignore global leak checking +- Added browser `?grep=pattern` support +- Added `--globals ` to specify accepted globals. Closes [#99](https://github.com/mochajs/mocha/issues/99) +- Fixed `mocha-debug(1)` on some systems. Closes [#232](https://github.com/mochajs/mocha/issues/232) +- Fixed growl total, use `runner.total` + +# 0.2.0 / 2011-11-30 + +- Added `--globals ` to specify accepted globals. Closes [#99](https://github.com/mochajs/mocha/issues/99) +- Fixed funky highlighting of messages. Closes [#97](https://github.com/mochajs/mocha/issues/97) +- Fixed `mocha-debug(1)`. Closes [#232](https://github.com/mochajs/mocha/issues/232) +- Fixed growl total, use runner.total + +# 0.1.0 / 2011-11-29 + +- Added `suiteSetup` and `suiteTeardown` to TDD interface [David Henderson] +- Added growl icons. Closes [#84](https://github.com/mochajs/mocha/issues/84) +- Fixed coffee-script support + +# 0.0.8 / 2011-11-25 + +- Fixed: use `Runner#total` for accurate reporting + +# 0.0.7 / 2011-11-25 + +- Added `Hook` +- Added `Runnable` +- Changed: `Test` is `Runnable` +- Fixed global leak reporting in hooks +- Fixed: > 2 calls to done() only report the error once +- Fixed: clear timer on failure. Closes [#80](https://github.com/mochajs/mocha/issues/80) + +# 0.0.6 / 2011-11-25 + +- Fixed return on immediate async error. Closes [#80](https://github.com/mochajs/mocha/issues/80) + +# 0.0.5 / 2011-11-24 + +- Fixed: make mocha.opts whitespace less picky [kkaefer] + +# 0.0.4 / 2011-11-24 + +- Added `--interfaces` +- Added `--reporters` +- Added `-c, --colors`. Closes [#69](https://github.com/mochajs/mocha/issues/69) +- Fixed hook timeouts + +# 0.0.3 / 2011-11-23 + +- Added `-C, --no-colors` to explicitly disable +- Added coffee-script support + +# 0.0.2 / 2011-11-22 + +- Fixed global leak detection due to Safari bind() change +- Fixed: escape html entities in Doc reporter +- Fixed: escape html entities in HTML reporter +- Fixed pending test support for HTML reporter. Closes [#66](https://github.com/mochajs/mocha/issues/66) + +# 0.0.1 / 2011-11-22 + +- Added `--timeout` second shorthand support, ex `--timeout 3s`. +- Fixed "test end" event for uncaughtExceptions. Closes [#61](https://github.com/mochajs/mocha/issues/61) + +# 0.0.1-alpha6 / 2011-11-19 + +- Added travis CI support (needs enabling when public) +- Added preliminary browser support +- Added `make mocha.css` target. Closes [#45](https://github.com/mochajs/mocha/issues/45) +- Added stack trace to TAP errors. Closes [#52](https://github.com/mochajs/mocha/issues/52) +- Renamed tearDown to teardown. Closes [#49](https://github.com/mochajs/mocha/issues/49) +- Fixed: cascading hooksc. Closes [#30](https://github.com/mochajs/mocha/issues/30) +- Fixed some colors for non-tty +- Fixed errors thrown in sync test-cases due to nextTick +- Fixed Base.window.width... again give precedence to 0.6.x + +# 0.0.1-alpha5 / 2011-11-17 + +- Added `doc` reporter. Closes [#33](https://github.com/mochajs/mocha/issues/33) +- Added suite merging. Closes [#28](https://github.com/mochajs/mocha/issues/28) +- Added TextMate bundle and `make tm`. Closes [#20](https://github.com/mochajs/mocha/issues/20) + +# 0.0.1-alpha4 / 2011-11-15 + +- Fixed getWindowSize() for 0.4.x + +# 0.0.1-alpha3 / 2011-11-15 + +- Added `-s, --slow ` to specify "slow" test threshold +- Added `mocha-debug(1)` +- Added `mocha.opts` support. Closes [#31](https://github.com/mochajs/mocha/issues/31) +- Added: default [files] to _test/\*.js_ +- Added protection against multiple calls to `done()`. Closes [#35](https://github.com/mochajs/mocha/issues/35) +- Changed: bright yellow for slow Dot reporter tests + +# 0.0.1-alpha2 / 2011-11-08 + +- Missed this one :) + +# 0.0.1-alpha1 / 2011-11-08 + +- Initial release diff --git a/docs/changelogs/CHANGELOG_V4.md b/docs/changelogs/CHANGELOG_V4.md new file mode 100644 index 0000000000..d09c6928b5 --- /dev/null +++ b/docs/changelogs/CHANGELOG_V4.md @@ -0,0 +1,84 @@ +# 4.1.0 / 2017-12-28 + +This is mainly a "housekeeping" release. + +Welcome [@Bamieh](https://github.com/Bamieh) and [@xxczaki](https://github.com/xxczaki) to the team! + +## :bug: Fixes + +- [#2661](https://github.com/mochajs/mocha/issues/2661): `progress` reporter now accepts reporter options ([@canoztokmak](https://github.com/canoztokmak)) +- [#3142](https://github.com/mochajs/mocha/issues/3142): `xit` in `bdd` interface now properly returns its `Test` object ([@Bamieh](https://github.com/Bamieh)) +- [#3075](https://github.com/mochajs/mocha/pull/3075): Diffs now computed eagerly to avoid misinformation when reported ([@abrady0](https://github.com/abrady0)) +- [#2745](https://github.com/mochajs/mocha/issues/2745): `--help` will now help you even if you have a `mocha.opts` ([@Zarel](https://github.com/Zarel)) + +## :tada: Enhancements + +- [#2514](https://github.com/mochajs/mocha/issues/2514): The `--no-diff` flag will completely disable diff output ([@CapacitorSet](https://github.com/CapacitorSet)) +- [#3058](https://github.com/mochajs/mocha/issues/3058): All "setters" in Mocha's API are now also "getters" if called without arguments ([@makepanic](https://github.com/makepanic)) + +## :book: Documentation + +- [#3170](https://github.com/mochajs/mocha/pull/3170): Optimization and site speed improvements ([@Munter](https://github.com/munter)) +- [#2987](https://github.com/mochajs/mocha/issues/2987): Moved the old [site repo](https://github.com/mochajs/mochajs.github.io) into the main repo under `docs/` ([@boneskull](https://github.com/boneskull)) +- [#2896](https://github.com/mochajs/mocha/issues/2896): Add [maintainer guide](https://github.com/mochajs/mocha/blob/master/MAINTAINERS.md) ([@boneskull](https://github.com/boneskull)) +- Various fixes and updates ([@xxczaki](https://github.com/xxczaki), [@maty21](https://github.com/maty21), [@leedm777](https://github.com/leedm777)) + +## :nut_and_bolt: Other + +- Test improvements and fixes ([@eugenet8k](https://github.com/eugenet8k), [@ngeor](https://github.com/ngeor), [@38elements](https://github.com/38elements), [@Gerhut](https://github.com/Gerhut), [@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull)) +- Refactoring and cruft excision ([@38elements](https://github.com/38elements), [@Bamieh](https://github.com/Bamieh), [@finnigantime](https://github.com/finnigantime), [@boneskull](https://github.com/boneskull)) + +# 4.0.1 / 2017-10-05 + +## :bug: Fixes + +- [#3051](https://github.com/mochajs/mocha/pull/3051): Upgrade Growl to v1.10.3 to fix its [peer dep problems](https://github.com/tj/node-growl/pull/68) ([@dpogue](https://github.com/dpogue)) + +# 4.0.0 / 2017-10-02 + +You might want to read this before filing a new bug! :stuck_out_tongue_closed_eyes: + +## :boom: Breaking Changes + +For more info, please [read this article](https://boneskull.com/mocha-v4-nears-release/). + +### Compatibility + +- [#3016](https://github.com/mochajs/mocha/issues/3016): Drop support for unmaintained versions of Node.js ([@boneskull](https://github.com/boneskull)): + - 0.10.x + - 0.11.x + - 0.12.x + - iojs (any) + - 5.x.x +- [#2979](https://github.com/mochajs/mocha/issues/2979): Drop support for non-ES5-compliant browsers ([@boneskull](https://github.com/boneskull)): + - IE7 + - IE8 + - PhantomJS 1.x +- [#2615](https://github.com/mochajs/mocha/issues/2615): Drop Bower support; old versions (3.x, etc.) will remain available ([@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull)) + +### Default Behavior + +- [#2879](https://github.com/mochajs/mocha/issues/2879): By default, Mocha will no longer force the process to exit once all tests complete. This means any test code (or code under test) which would normally prevent `node` from exiting will do so when run in Mocha. Supply the `--exit` flag to revert to pre-v4.0.0 behavior ([@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull)) + +### Reporter Output + +- [#2095](https://github.com/mochajs/mocha/issues/2095): Remove `stdout:` prefix from browser reporter logs ([@skeggse](https://github.com/skeggse)) +- [#2295](https://github.com/mochajs/mocha/issues/2295): Add separator in "unified diff" output ([@olsonpm](https://github.com/olsonpm)) +- [#2686](https://github.com/mochajs/mocha/issues/2686): Print failure message when `--forbid-pending` or `--forbid-only` is specified ([@ScottFreeCode](https://github.com/ScottFreeCode)) +- [#2814](https://github.com/mochajs/mocha/pull/2814): Indent contexts for better readability when reporting failures ([@charlierudolph](https://github.com/charlierudolph)) + +## :-1: Deprecations + +- [#2493](https://github.com/mochajs/mocha/issues/2493): The `--compilers` command-line option is now soft-deprecated and will emit a warning on `STDERR`. Read [this](https://github.com/mochajs/mocha/wiki/compilers-deprecation) for more info and workarounds ([@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull)) + +## :tada: Enhancements + +- [#2628](https://github.com/mochajs/mocha/issues/2628): Allow override of default test suite name in XUnit reporter ([@ngeor](https://github.com/ngeor)) + +## :book: Documentation + +- [#3020](https://github.com/mochajs/mocha/pull/3020): Link to CLA in `README.md` and `CONTRIBUTING.md` ([@skeggse](https://github.com/skeggse)) + +## :nut_and_bolt: Other + +- [#2890](https://github.com/mochajs/mocha/issues/2890): Speed up build by (re-)consolidating SauceLabs tests ([@boneskull](https://github.com/boneskull)) diff --git a/lib/runnable.js b/lib/runnable.js index 0346b36346..7d3011dc86 100644 --- a/lib/runnable.js +++ b/lib/runnable.js @@ -335,7 +335,7 @@ Runnable.prototype.run = function(fn) { fn(err); } - // for .resetTimeout() + // for .resetTimeout() and Runner#uncaught() this.callback = done; if (this.fn && typeof this.fn.call !== 'function') { diff --git a/lib/runner.js b/lib/runner.js index 948a9b9021..ceb1a24a4f 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -654,7 +654,7 @@ Runner.prototype.runTests = function(suite, fn) { self.emit(constants.EVENT_TEST_END, test); // skip inner afterEach hooks below errSuite level var origSuite = self.suite; - self.suite = errSuite; + self.suite = errSuite || self.suite; return self.hookUp(HOOK_TYPE_AFTER_EACH, function(e, eSuite) { self.suite = origSuite; next(e, eSuite); @@ -724,7 +724,6 @@ Runner.prototype.runSuite = function(suite, fn) { var i = 0; var self = this; var total = this.grepTotal(suite); - var afterAllHookCalled = false; debug('run suite %s', suite.fullTitle()); @@ -772,21 +771,13 @@ Runner.prototype.runSuite = function(suite, fn) { self.suite = suite; self.nextSuite = next; - if (afterAllHookCalled) { - fn(errSuite); - } else { - // mark that the afterAll block has been called once - // and so can be skipped if there is an error in it. - afterAllHookCalled = true; - - // remove reference to test - delete self.test; + // remove reference to test + delete self.test; - self.hook(HOOK_TYPE_AFTER_ALL, function() { - self.emit(constants.EVENT_SUITE_END, suite); - fn(errSuite); - }); - } + self.hook(HOOK_TYPE_AFTER_ALL, function() { + self.emit(constants.EVENT_SUITE_END, suite); + fn(errSuite); + }); } this.nextSuite = next; @@ -861,36 +852,13 @@ Runner.prototype.uncaught = function(err) { // we cannot recover gracefully if a Runnable has already passed // then fails asynchronously - var alreadyPassed = runnable.isPassed(); - // this will change the state to "failed" regardless of the current value - this.fail(runnable, err); - if (!alreadyPassed) { - // recover from test - if (runnable.type === constants.EVENT_TEST_BEGIN) { - this.emit(constants.EVENT_TEST_END, runnable); - this.hookUp(HOOK_TYPE_AFTER_EACH, this.next); - return; - } + if (runnable.isPassed()) { + this.fail(runnable, err); + this.abort(); + } else { debug(runnable); - - // recover from hooks - var errSuite = this.suite; - - // XXX how about a less awful way to determine this? - // if hook failure is in afterEach block - if (runnable.fullTitle().indexOf('after each') > -1) { - return this.hookErr(err, errSuite, true); - } - // if hook failure is in beforeEach block - if (runnable.fullTitle().indexOf('before each') > -1) { - return this.hookErr(err, errSuite, false); - } - // if hook failure is in after or before blocks - return this.nextSuite(errSuite); + return runnable.callback(err); } - - // bail - this.abort(); }; /** diff --git a/package-lock.json b/package-lock.json index e66be18a00..05f0471347 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mocha", - "version": "7.0.0", + "version": "7.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -279,51 +279,6 @@ } } }, - "@mocha/contributors": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mocha/contributors/-/contributors-1.0.4.tgz", - "integrity": "sha512-bdOaBixwP7948K7xlqSXnelbsLDAnCX1h4qSRYfbRADMg+UtNJE+ggpzTdBVpdLNxJLkgnRM5KJ9MXiLoMib3Q==", - "dev": true, - "requires": { - "log-symbols": "^2.2.0", - "parse-author": "^2.0.0", - "pkg-up": "^2.0.0", - "write-pkg": "^3.2.0", - "yargs": "^12.0.5" - }, - "dependencies": { - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, "@mocha/docdash": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@mocha/docdash/-/docdash-2.1.2.tgz", @@ -846,13 +801,79 @@ "dev": true }, "array-includes": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", - "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", + "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.7.0" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0", + "is-string": "^1.0.5" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz", + "integrity": "sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + } } }, "array-map": { @@ -900,6 +921,81 @@ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, + "array.prototype.flat": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", + "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz", + "integrity": "sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + } + } + }, "arraybuffer.slice": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", @@ -1292,12 +1388,6 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, - "author-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/author-regex/-/author-regex-1.0.0.tgz", - "integrity": "sha1-0IiFvmubv5Q5/gh8dihyRfCoFFA=", - "dev": true - }, "autolinker": { "version": "0.28.1", "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.28.1.tgz", @@ -3149,28 +3239,6 @@ "tiny-emitter": "^2.0.0" } }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", @@ -4355,12 +4423,6 @@ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", "dev": true }, - "detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", - "dev": true - }, "detect-libc": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", @@ -5092,47 +5154,48 @@ } }, "eslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", - "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", + "ajv": "^6.10.0", "chalk": "^2.1.0", "cross-spawn": "^6.0.5", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", "esquery": "^1.0.1", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.11", + "lodash": "^4.17.14", "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", + "optionator": "^0.8.3", "progress": "^2.0.0", "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", "table": "^5.2.3", - "text-table": "^0.2.0" + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" }, "dependencies": { "debug": { @@ -5144,37 +5207,102 @@ "ms": "^2.1.1" } }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", + "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, "import-fresh": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", - "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", "dev": true, "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "dev": true + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true } } }, "eslint-config-prettier": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-3.6.0.tgz", - "integrity": "sha512-ixJ4U3uTLXwJts4rmSVW/lMXjlGwCijhBJHk8iVqKKSifeI0qgFEfWl8L63isfc8Od7EiBALF6BX3jKLluf/jQ==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.9.0.tgz", + "integrity": "sha512-k4E14HBtcLv0uqThaI6I/n1LEqROp8XaPu6SO9Z32u5NlGRC07Enu1Bh2KEFw4FNHbekH8yzbIU9kUGxbiGmCA==", "dev": true, "requires": { "get-stdin": "^6.0.0" @@ -5189,15 +5317,15 @@ } }, "eslint-config-semistandard": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-semistandard/-/eslint-config-semistandard-13.0.0.tgz", - "integrity": "sha512-ZuImKnf/9LeZjr6dtRJ0zEdQbjBwXu0PJR3wXJXoQeMooICMrYPyD70O1tIA9Ng+wutgLjB7UXvZOKYPvzHg+w==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-semistandard/-/eslint-config-semistandard-15.0.0.tgz", + "integrity": "sha512-volIMnosUvzyxGkYUA5QvwkahZZLeUx7wcS0+7QumPn+MMEBbV6P7BY1yukamMst0w3Et3QZlCjQEwQ8tQ6nug==", "dev": true }, "eslint-config-standard": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", - "integrity": "sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.0.tgz", + "integrity": "sha512-EF6XkrrGVbvv8hL/kYa/m6vnvmUT+K82pJJc4JJVMM6+Qgqh0pnwprSxdduDLB9p/7bIxD+YV5O0wfb8lmcPbA==", "dev": true }, "eslint-import-resolver-node": { @@ -5213,7 +5341,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -5228,19 +5356,19 @@ } }, "eslint-module-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz", - "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.0.tgz", + "integrity": "sha512-kCo8pZaNz2dsAW7nCUjuVoI11EBXXpIzfNxmaoLhXoRDOnqXLC4iSGVRdZPhOitfbdEfMEfKOiENaK6wDPZEGw==", "dev": true, "requires": { - "debug": "^2.6.8", + "debug": "^2.6.9", "pkg-dir": "^2.0.0" }, "dependencies": { "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -5255,38 +5383,47 @@ } }, "eslint-plugin-es": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz", - "integrity": "sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.0.tgz", + "integrity": "sha512-6/Jb/J/ZvSebydwbBJO1R9E5ky7YeElfK56Veh7e4QGFHCXoIXGH9HhVz+ibJLM3XJ1XjP+T7rKBLUa/Y7eIng==", "dev": true, "requires": { - "eslint-utils": "^1.3.0", - "regexpp": "^2.0.1" + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "dependencies": { + "regexpp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", + "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", + "dev": true + } } }, "eslint-plugin-import": { - "version": "2.17.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.17.3.tgz", - "integrity": "sha512-qeVf/UwXFJbeyLbxuY8RgqDyEKCkqV7YC+E5S5uOjAp4tOc8zj01JP3ucoBM8JcEqd1qRasJSg6LLlisirfy0Q==", + "version": "2.19.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.19.1.tgz", + "integrity": "sha512-x68131aKoCZlCae7rDXKSAQmbT5DQuManyXo2sK6fJJ0aK5CWAkv6A6HJZGgqC8IhjQxYPgo6/IY4Oz8AFsbBw==", "dev": true, "requires": { "array-includes": "^3.0.3", + "array.prototype.flat": "^1.2.1", "contains-path": "^0.1.0", "debug": "^2.6.9", "doctrine": "1.5.0", "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.4.0", + "eslint-module-utils": "^2.4.1", "has": "^1.0.3", - "lodash": "^4.17.11", "minimatch": "^3.0.4", + "object.values": "^1.1.0", "read-pkg-up": "^2.0.0", - "resolve": "^1.11.0" + "resolve": "^1.12.0" }, "dependencies": { "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -5394,9 +5531,9 @@ } }, "resolve": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz", + "integrity": "sha512-fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -5411,52 +5548,67 @@ } }, "eslint-plugin-node": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-8.0.1.tgz", - "integrity": "sha512-ZjOjbjEi6jd82rIpFSgagv4CHWzG9xsQAVp1ZPlhRnnYxcTgENUVBvhYmkQ7GvT1QFijUSo69RaiOJKhMu6i8w==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.0.0.tgz", + "integrity": "sha512-chUs/NVID+sknFiJzxoN9lM7uKSOEta8GC8365hw1nDfwIPIjjpRSwwPvQanWv8dt/pDe9EV4anmVSwdiSndNg==", "dev": true, "requires": { - "eslint-plugin-es": "^1.3.1", - "eslint-utils": "^1.3.1", - "ignore": "^5.0.2", + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", + "ignore": "^5.1.1", "minimatch": "^3.0.4", - "resolve": "^1.8.1", - "semver": "^5.5.0" + "resolve": "^1.10.1", + "semver": "^6.1.0" }, "dependencies": { "ignore": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.0.5.tgz", - "integrity": "sha512-kOC8IUb8HSDMVcYrDVezCxpJkzSQWTAzf3olpKM6o9rM5zpojx23O0Fl8Wr4+qJ6ZbPEHqf1fdwev/DS7v7pmA==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "dev": true + }, + "resolve": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz", + "integrity": "sha512-fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, "eslint-plugin-prettier": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz", - "integrity": "sha512-XWX2yVuwVNLOUhQijAkXz+rMPPoCr7WFiAl8ig6I7Xn+pPVhDhzg4DxHpmbeb0iqjO9UronEA3Tb09ChnFVHHA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz", + "integrity": "sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" } }, "eslint-plugin-promise": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.1.1.tgz", - "integrity": "sha512-faAHw7uzlNPy7b45J1guyjazw28M+7gJokKUjC5JSFoYfUEyy6Gw/i7YQvmv2Yk00sUjWcmzXQLpU1Ki/C2IZQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", + "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", "dev": true }, "eslint-plugin-standard": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.0.tgz", - "integrity": "sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", + "integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==", "dev": true }, "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -5464,35 +5616,47 @@ } }, "eslint-utils": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz", - "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", + "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.0.0" + "eslint-visitor-keys": "^1.1.0" } }, "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", "dev": true }, "espree": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", - "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", + "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", "dev": true, "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" + "acorn": "^7.1.0", + "acorn-jsx": "^5.1.0", + "eslint-visitor-keys": "^1.1.0" }, "dependencies": { "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "dev": true + }, + "acorn-jsx": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", + "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", "dev": true } } @@ -5806,9 +5970,9 @@ } }, "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "dev": true, "requires": { "chardet": "^0.7.0", @@ -8397,43 +8561,132 @@ } }, "inquirer": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", - "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.1.tgz", + "integrity": "sha512-V1FFQ3TIO15det8PijPLFR9M9baSlnRs9nL7zWu1MNVA2T9YVl9ZbrHJhYs7e9X8jeMZ3lr2JH/rdHFgNCBdYw==", "dev": true, "requires": { - "ansi-escapes": "^3.2.0", + "ansi-escapes": "^4.2.1", "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", + "cli-cursor": "^3.1.0", "cli-width": "^2.0.0", "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.11", - "mute-stream": "0.0.7", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", + "rxjs": "^6.5.3", + "string-width": "^4.1.0", "strip-ansi": "^5.1.0", "through": "^2.3.6" }, "dependencies": { + "ansi-escapes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", + "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", + "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" } }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, "rxjs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", - "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", + "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", "dev": true, "requires": { "tslib": "^1.9.0" } + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true } } }, @@ -8485,12 +8738,6 @@ } } }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, "ip-regex": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", @@ -8902,6 +9149,12 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, "is-svg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", @@ -9680,15 +9933,6 @@ "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", "dev": true }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, "lcov-parse": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", @@ -10514,15 +10758,6 @@ "integrity": "sha1-9M+EV7km7u4qg7FzUBQUvHbrlZc=", "dev": true }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -10917,17 +11152,6 @@ "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true }, - "mem": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.1.0.tgz", - "integrity": "sha512-I5u6Q1x7wxO0kdOpYBB28xueHADYps5uty/zg936CiG8NTe5sJL8EjrCuLneuDW3PlMdZBGDIn8BirEVdovZvg==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^1.0.0", - "p-is-promise": "^2.0.0" - } - }, "memoizeasync": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/memoizeasync/-/memoizeasync-1.1.0.tgz", @@ -11265,9 +11489,9 @@ "dev": true }, "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, "nan": { @@ -12402,17 +12626,6 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, "os-shim": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", @@ -12450,12 +12663,6 @@ "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", "dev": true }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, "p-event": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-event/-/p-event-1.3.0.tgz", @@ -12471,12 +12678,6 @@ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, - "p-is-promise": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", - "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", - "dev": true - }, "p-limit": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", @@ -12607,15 +12808,6 @@ "safe-buffer": "^5.1.1" } }, - "parse-author": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/parse-author/-/parse-author-2.0.0.tgz", - "integrity": "sha1-00YL8d3Q367tQtp1QkLmX7aEqB8=", - "dev": true, - "requires": { - "author-regex": "^1.0.0" - } - }, "parse-entities": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.1.tgz", @@ -13002,60 +13194,6 @@ } } }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - } - } - }, "please-upgrade-node": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz", @@ -16246,6 +16384,26 @@ "integrity": "sha1-q6Nt4I3O5qWjN9SbLqHaGyj8Ds8=", "dev": true }, + "string.prototype.trimleft": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", + "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", + "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -16511,17 +16669,29 @@ } }, "table": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.0.tgz", - "integrity": "sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw==", + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", "dev": true, "requires": { - "ajv": "^6.9.1", - "lodash": "^4.17.11", + "ajv": "^6.10.2", + "lodash": "^4.17.14", "slice-ansi": "^2.1.0", "string-width": "^3.0.0" }, "dependencies": { + "ajv": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -17802,6 +17972,12 @@ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "dev": true }, + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "dev": true + }, "valid-url": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", @@ -18088,6 +18264,12 @@ } } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -18172,38 +18354,6 @@ "integrity": "sha1-wlLXx8WxtAKJdjDjRTx7/mkNnKE=", "dev": true }, - "write-json-file": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz", - "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", - "dev": true, - "requires": { - "detect-indent": "^5.0.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "pify": "^3.0.0", - "sort-keys": "^2.0.0", - "write-file-atomic": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "write-pkg": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz", - "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", - "dev": true, - "requires": { - "sort-keys": "^2.0.0", - "write-json-file": "^2.2.0" - } - }, "ws": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz", diff --git a/package-scripts.js b/package-scripts.js index 0e414e1542..3f9b2d0bd4 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -307,9 +307,9 @@ module.exports = { description: 'Build API docs' } }, - updateContributors: { - script: 'contributors', - description: 'Update list of contributors in package.json' + updateAuthors: { + script: 'node scripts/update-authors.js', + description: 'Update list of AUTHORS' }, linkifyChangelog: { script: 'node scripts/linkify-changelog.js', @@ -317,7 +317,7 @@ module.exports = { }, version: { script: - 'nps updateContributors && nps linkifyChangelog && git add -A ./package.json ./CHANGELOG.md', + 'nps updateAuthors && nps linkifyChangelog && git add -A ./AUTHORS ./CHANGELOG.md', description: 'Tasks to perform when `npm version` is run' } } diff --git a/package.json b/package.json index 9e407ab19a..8b6b4526bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mocha", - "version": "7.0.0", + "version": "7.0.1", "description": "simple, flexible, fun test framework", "keywords": [ "mocha", @@ -14,498 +14,6 @@ "url": "https://opencollective.com/mochajs" }, "author": "TJ Holowaychuk ", - "contributors": [ - "38elements ", - "Aaron Brady ", - "Aaron Hamid ", - "Aaron Heckmann ", - "Aaron Krause ", - "Aaron Petcoff ", - "abrkn ", - "Adam Crabtree ", - "Adam Ginzberg ", - "Adam Gruber ", - "Adrian Ludwig ", - "Ahmad Bamieh ", - "airportyh ", - "Ajay Kodali ", - "Al Scott ", - "Alex Bainter ", - "Alexander Early ", - "Alexander Shepelin ", - "Alhadis ", - "amsul ", - "Anders Olsen Sandvik ", - "Andreas Brekken ", - "Andreas Lind ", - "Andreas Lind Petersen ", - "Andrew Bradley ", - "Andrew Bradley ", - "Andrew Krawchyk <903716+akrawchyk@users.noreply.github.com>", - "Andrew Nesbitt ", - "Andrey Popp <8mayday@gmail.com>", - "Andrii Shumada ", - "andy matthews ", - "Angelica Valenta ", - "Anis Safine ", - "Anish Karandikar ", - "Anna Henningsen ", - "Anthony ", - "Anton ", - "anton ", - "APerson ", - "Arian Stolwijk ", - "Ariel Mashraki ", - "Arnaud Brousseau ", - "Artem Govorov ", - "Atsuya Takagi ", - "Attila Domokos ", - "Austin Birch ", - "Avi Vahl ", - "badunk ", - "Bamieh ", - "Ben Bradley ", - "Ben Glassman ", - "Ben Harris ", - "Ben Hutchison ", - "Ben Lindsey ", - "Ben Noordhuis ", - "Ben Vinegar ", - "Benjamin Eidelman ", - "Benjie Gillam ", - "Benoit Larroque ", - "Benoît Zugmeyer ", - "Benson Trent ", - "Berker Peksag ", - "berni ", - "Bjørge Næss ", - "Bjorn Stromberg ", - "Brendan Nee ", - "Brian Beck ", - "Brian Lagerman <49239617+brian-lagerman@users.noreply.github.com>", - "Brian Lalor ", - "Brian M. Carlson ", - "Brian Moore ", - "Brian Tomlin ", - "Brittany Moore ", - "Bryan Donovan ", - "Buck Doyle ", - "C. Scott Ananian ", - "Callum Macrae ", - "Can Oztokmak ", - "Capacitor Set ", - "Carl-Erik Kopseng ", - "Casey Foster ", - "Charles Lowell ", - "Charles Merriam ", - "Charles Samborski ", - "Charlie Rudolph ", - "Chen Yangjian <252317+cyjake@users.noreply.github.com>", - "Chris ", - "Chris Buckley ", - "Chris Lamb ", - "Christian ", - "Christoffer Hallas ", - "Christoph Neuroth ", - "Christopher Hiller ", - "ChrisWren ", - "claudyus ", - "Connor Dunn ", - "Corey Butler ", - "Corey Farrell ", - "Cory Thomas ", - "Craig Taub ", - "Cube ", - "Daniel Ruf <827205+DanielRuf@users.noreply.github.com>", - "Daniel Ruf ", - "Daniel St. Jules ", - "Daniel Stockman ", - "Darryl Pogue ", - "Dave McKenna ", - "David da Silva Contín ", - "David Henderson ", - "David M. Lee ", - "David Neubauer ", - "DavidLi119 ", - "DavNej ", - "Denis Bardadym ", - "Devin Weaver ", - "dfberry ", - "Di Wu ", - "Dina Berry ", - "Diogo Monteiro ", - "Dmitrii Sorin ", - "Dmitriy Simushev ", - "Dmitry Shirokov ", - "Dmitry Sorin ", - "Domenic Denicola ", - "Dominic Barnes ", - "Dominique Quatravaux ", - "Douglas Christopher Wilson ", - "Duncan Beevers ", - "eiji.ienaga ", - "elergy ", - "Eli Skeggs ", - "ELLIOTTCABLE ", - "Emanuele ", - "Enric Pallerols ", - "Erik Eng ", - "Eugene Tiutiunnyk ", - "EunChan Park ", - "Fabio M. Costa ", - "Fábio Santos ", - "Fagner Brack ", - "fargies ", - "FARKAS Máté ", - "fcrisci ", - "Fede Ramirez ", - "Fedor Indutny ", - "fengmk2 ", - "Fin Chen ", - "Florian Margaine ", - "FND ", - "fool2fish ", - "Forbes Lindesay ", - "Frank Leon Rose ", - "Frederico Silva ", - "Fredrik Enestad ", - "Fredrik Lindin ", - "Fumiaki MATSUSHIMA ", - "Gabe Gorelick ", - "Gabriel Silk ", - "Gareth Aye ", - "Gareth Murphy ", - "Gastón I. Silva ", - "Gavin Mogan ", - "gaye ", - "gigadude ", - "Giovanni Bassi ", - "gizemkeser <44727928+gizemkeser@users.noreply.github.com>", - "Glen Huang ", - "Glen Mailer ", - "grasGendarme ", - "Greg Perkins ", - "Guangcong Luo ", - "Guillermo Rauch ", - "Guy Arye ", - "Gyandeep Singh ", - "Harish ", - "Harry Brundage ", - "Harry Sarson ", - "Harry Wolff ", - "Herman Junge ", - "hokaccha ", - "Honza Javorek ", - "Hugo Giraudel ", - "Hugo Kim ", - "HYUNSANG HAN ", - "HyunSangHan ", - "Ian Storm Taylor ", - "Ian W. Remmel ", - "Ian Young ", - "Ian Zamojc ", - "Igwe Kalu ", - "ImgBot <31427850+ImgBotApp@users.noreply.github.com>", - "inxorable ", - "Ivan ", - "Jaakko Salonen ", - "Jacob Wejendorp ", - "Jake Craige ", - "Jake Marsh ", - "Jakob Krigovsky ", - "Jakub Nešetřil ", - "James Bowes ", - "James Carr ", - "James D. Rogers ", - "James G. Kim ", - "James Lal ", - "James Nylen ", - "Jan Kopriva ", - "Jan Krems ", - "Jan Lehnardt ", - "Jan-Philip Gehrcke ", - "Jason Barry ", - "Jason Lai ", - "Jason Leyba ", - "Javier Aranda ", - "Jayasankar ", - "Jean Ponchon ", - "Jeff Kunkle ", - "Jeff Schilling ", - "JeongHoon Byun (aka Outsider) ", - "Jérémie Astori ", - "Jeremy Martin ", - "Jerry Muzsik ", - "Jesse Dailey ", - "jimenglish81 ", - "Jimmy Cuadra ", - "Jo Liss ", - "Joao Moreno ", - "Joel Kemp ", - "Joey Cozza ", - "John Doty ", - "John Firebaugh ", - "John Reeves ", - "Johnathon Sanders ", - "Jon Surrell ", - "Jonas Dohse ", - "Jonas Westerlund ", - "Jonathan Creamer ", - "Jonathan Delgado ", - "Jonathan Kim ", - "Jonathan Ong ", - "Jonathan Park ", - "Jonathan Rajavuori ", - "Jordan Sexton ", - "Joseph Lin ", - "Josh Eversmann ", - "Josh Lory ", - "Josh Soref ", - "Joshua Appelman ", - "Joshua Krall ", - "JP Bochi ", - "jsdevel ", - "Juerg B <44573692+juergba@users.noreply.github.com>", - "juergba ", - "Julien Wajsberg ", - "Jupp Müller ", - "Jussi Virtanen ", - "Justin DuJardin ", - "Juzer Ali ", - "Katie Gengler ", - "kavun ", - "Kazuhito Hokamura ", - "Keith Cirkel ", - "Kelong Wang ", - "Kent C. Dodds ", - "Kevin Burke ", - "Kevin Conway ", - "Kevin Kirsche ", - "Kevin Partington ", - "Kevin Wang ", - "Kirill Korolyov ", - "klaemo ", - "Koen Punt ", - "Konstantin Käfer ", - "Kris Rasmussen ", - "Kunal Nagpal ", - "Kyle Fuller ", - "Kyle Mitchell ", - "lakmeer ", - "Lane Kelly ", - "László Bácsi ", - "Laurence Rowe ", - "Liam Newman ", - "Lindsay-Needs-Sleep <51773923+Lindsay-Needs-Sleep@users.noreply.github.com>", - "Linus Unnebäck ", - "lodr ", - "Long Ho ", - "Maciej Małecki ", - "Mal Graty ", - "Marais Rossouw ", - "Marc Kuo ", - "Marc Udoff ", - "Marcello Bastea-Forte ", - "Mario Díaz Ceñera <46492068+MarioDiaz98@users.noreply.github.com>", - "Mark Banner ", - "Mark Owsiak ", - "Markus Tacker ", - "Martijn Cuppens ", - "Martin Marko ", - "Mathieu Desvé ", - "Matija Marohnić ", - "Matt Bierner ", - "Matt Giles ", - "Matt Robenolt ", - "Matt Smith ", - "Matthew Shanley ", - "Mattias Tidlund ", - "Max Goodman ", - "Maximilian Antoni ", - "Merrick Christensen ", - "Mia ", - "Michael Demmer ", - "Michael Jackson ", - "Michael Olson ", - "Michael Riley ", - "Michael Schoonmaker ", - "Michal Charemza ", - "Michiel de Jong ", - "Mick Brooks ", - "Mike Pennisi ", - "Mislav Marohnić ", - "monowerker ", - "Moshe Kolodny ", - "mrShturman ", - "Nathan Alderson ", - "Nathan Black ", - "Nathan Bowser ", - "Nathan Houle ", - "Nathan Rajlich ", - "nexdrew ", - "Nick Fitzgerald ", - "Nicolas Girault ", - "Nicolo Taddei ", - "Nik Nyby ", - "Nikolaos Georgiou ", - "nishigori ", - "Noshir Patel ", - "not-an-aardvark ", - "OlegTsyba ", - "Oliver Salzburg ", - "olsonpm ", - "omardelarosa ", - "Oscar Godson ", - "Outsider ", - "oveddan ", - "P. Roebuck ", - "Panu Horsmalahti ", - "Park Seong-beom ", - "Parker Moore ", - "Pascal ", - "Pat Finnigan ", - "Paul Armstrong ", - "Paul Miller ", - "Paul Roebuck ", - "Pavel Zubkou ", - "Pete Hawkins ", - "Peter Müller ", - "Peter Rust ", - "Peter Schmidt ", - "Phil Sung ", - "Philip M. White ", - "Piotr Kuczynski ", - "PoppinL ", - "Poprádi Árpád ", - "Prayag Verma ", - "qiuzuhui ", - "Quang Van ", - "Quanlong He ", - "R56 ", - "Raynos ", - "Refael Ackermann ", - "Rens Groothuijsen ", - "Rich Trott ", - "Richard Dingwall ", - "Richard Knop ", - "Rico Sta. Cruz ", - "rmacklin ", - "Rob Loach ", - "Rob Raux ", - "Rob Wu ", - "Robert Kieffer ", - "Robert Rossmann ", - "Romain Prieto ", - "Roman Neuhauser ", - "Roman Shtylman ", - "Ross Warren ", - "rotemdan ", - "Russ Bradberry ", - "Russell Munson ", - "Rustem Mustafin ", - "Ryan Hubbard ", - "Ryan Shaw ", - "Ryan Tablada ", - "Ryunosuke SATO ", - "ryym ", - "Saerom Bang ", - "Salehen Shovon Rahman ", - "Sam Mussell ", - "samuel goldszmidt ", - "sarehag ", - "Sasha Koss ", - "Scott Kao ", - "Scott Santucci ", - "ScottFreeCode ", - "Sean Lang ", - "Sebastian Van Sande ", - "sebv ", - "Seiya Konno ", - "Sergey Simonchik ", - "Sergio Santoro ", - "Shaine Hatch ", - "Shawn Krisman ", - "SheetJSDev ", - "Shinnosuke Watanabe ", - "silentcloud ", - "Silvio Massari ", - "Simon Gaeremynck ", - "Simon Goumaz ", - "simov ", - "Sindre Sorhus ", - "Slobodan Mišković ", - "slyg ", - "Soel ", - "solodynamo ", - "Sona Lee ", - "Soobin Bak ", - "Sorin Iclanzan ", - "Standa Opichal ", - "startswithaj ", - "Stephen Hess ", - "Stephen Mathieson ", - "Steve Mason ", - "Stewart Taylor ", - "Stone ", - "Sulabh Bista ", - "Sune Simonsen ", - "Svetlana <39729453+Lana-Light@users.noreply.github.com>", - "Sylvain ", - "Sylvester Keil ", - "Szauka <33459309+Szauka@users.noreply.github.com>", - "Tapiwa Kelvin ", - "Ted Yavuzkurt ", - "Teddy Zeenny ", - "tgautier@yahoo.com ", - "Thedark1337 ", - "Thomas Broadley ", - "Thomas Grainger ", - "Thomas Scholtes ", - "Thomas Vantuycom ", - "Tim Ehat ", - "Tim Harshman ", - "Timo Tijhof ", - "Timothy Gu ", - "Tingan Ho ", - "tmont ", - "Tobias Bieniek ", - "Tobias Mollstam ", - "Todd Agulnick ", - "Tom Coquereau ", - "Tom Hughes ", - "Tomer Eskenazi ", - "toyjhlee ", - "traleig1 ", - "Travis Jeffery ", - "tripu ", - "Tyson Tate ", - "Vadim Nikitin ", - "Valentin Agachi ", - "Valeri Karpov ", - "Victor ", - "Victor Costan ", - "Ville Saukkonen ", - "Vivek Ganesan ", - "vlad ", - "Vlad Magdalin ", - "Volker Buzek ", - "Wanseob Lim ", - "Wil Moore III ", - "Will Langstroth ", - "wsw ", - "Xavier Antoviaque ", - "Xavier Damman ", - "XhmikosR ", - "XhmikosR ", - "Yanis Wang ", - "yehiyam ", - "Yoshiya Hinosawa ", - "Yuest Wang ", - "yuitest ", - "zhiyelee ", - "Zsolt Takács ", - "现充 " - ], "license": "MIT", "repository": { "type": "git", @@ -562,7 +70,6 @@ }, "devDependencies": { "@11ty/eleventy": "^0.8.3", - "@mocha/contributors": "^1.0.4", "@mocha/docdash": "^2.1.2", "acorn": "^7.0.0", "assetgraph-builder": "^6.10.1", @@ -574,15 +81,15 @@ "coveralls": "^3.0.3", "cross-env": "^5.2.0", "cross-spawn": "^6.0.5", - "eslint": "^5.16.0", - "eslint-config-prettier": "^3.6.0", - "eslint-config-semistandard": "^13.0.0", - "eslint-config-standard": "^12.0.0", - "eslint-plugin-import": "^2.17.3", - "eslint-plugin-node": "^8.0.1", - "eslint-plugin-prettier": "^3.1.0", - "eslint-plugin-promise": "^4.1.1", - "eslint-plugin-standard": "^4.0.0", + "eslint": "^6.8.0", + "eslint-config-prettier": "^6.9.0", + "eslint-config-semistandard": "^15.0.0", + "eslint-config-standard": "^14.1.0", + "eslint-plugin-import": "^2.19.1", + "eslint-plugin-node": "^11.0.0", + "eslint-plugin-prettier": "^3.1.2", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-standard": "^4.0.1", "fs-extra": "^8.0.1", "husky": "^1.3.1", "hyperlink": "^4.3.1", @@ -652,13 +159,6 @@ "endOfLine": "auto" }, "gitter": "https://gitter.im/mochajs/mocha", - "@mocha/contributors": { - "exclude": [ - "greenkeeperio-bot ", - "greenkeeper[bot] ", - "TJ Holowaychuk " - ] - }, "husky": { "hooks": { "pre-commit": "lint-staged" diff --git a/scripts/netlify-headers.js b/scripts/netlify-headers.js index d74842bfce..4faae6f13d 100644 --- a/scripts/netlify-headers.js +++ b/scripts/netlify-headers.js @@ -92,7 +92,7 @@ new AssetGraph({root: 'docs/_dist'}) ); preconnectRelations.forEach(rel => { - let header = `Link: <${rel.href}>; rel=preconnect`; + const header = `Link: <${rel.href}>; rel=preconnect`; headerMap[url].push(header); diff --git a/scripts/update-authors.js b/scripts/update-authors.js new file mode 100755 index 0000000000..6e5d214f30 --- /dev/null +++ b/scripts/update-authors.js @@ -0,0 +1,62 @@ +#!/usr/bin/env node +// original comes from https://github.com/nodejs/node/blob/master/tools/update-authors.js + +// Usage: tools/update-author.js [--dry] +// Passing --dry will redirect output to stdout rather than write to 'AUTHORS'. +'use strict'; +const {spawn} = require('child_process'); +const fs = require('fs'); +const readline = require('readline'); + +const log = spawn( + 'git', + // Inspect author name/email and body. + ['log', '--reverse', '--format=Author: %aN <%aE>\n%b'], + { + stdio: ['inherit', 'pipe', 'inherit'] + } +); +const rl = readline.createInterface({input: log.stdout}); + +let output; +if (process.argv.includes('--dry')) { + output = process.stdout; +} else { + output = fs.createWriteStream('AUTHORS'); +} + +output.write('# Authors ordered by first contribution.\n\n'); + +const seen = new Set(); + +const excludeEmails = [ + '', + '' +]; + +// Support regular git author metadata, as well as `Author:` and +// `Co-authored-by:` in the message body. Both have been used in the past +// to indicate multiple authors per commit, with the latter standardized +// by GitHub now. +const authorRe = new RegExp( + '(^Author:|^Co-authored-by:)\\s+(?[^<]+)\\s+(?<[^>]+>)', + 'i' +); + +rl.on('line', line => { + const match = line.match(authorRe); + if (!match) return; + + const {author, email} = match.groups; + + if (seen.has(email) || excludeEmails.includes(email)) { + return; + } + + seen.add(email); + output.write(`${author} ${email}\n`); +}); + +rl.on('close', () => { + output.end('\n# Generated by scripts/update-authors.js\n'); +}); diff --git a/test/integration/fixtures/pending/programmatic.fixture.js b/test/integration/fixtures/pending/programmatic.fixture.js new file mode 100644 index 0000000000..65720be64c --- /dev/null +++ b/test/integration/fixtures/pending/programmatic.fixture.js @@ -0,0 +1,8 @@ +'use strict'; +const Mocha = require('../../../../lib/mocha'); + +const mocha = new Mocha({reporter: 'json'}); +mocha.addFile("./test/integration/fixtures/__default__.fixture.js"); + +const runner = mocha.run(); +runner.on('test', function (test) { test.pending = true; }); diff --git a/test/integration/fixtures/uncaught/recover.fixture.js b/test/integration/fixtures/uncaught/recover.fixture.js new file mode 100644 index 0000000000..945decb045 --- /dev/null +++ b/test/integration/fixtures/uncaught/recover.fixture.js @@ -0,0 +1,28 @@ +'use strict'; +const assert = require('assert'); + +describe('uncaught', function() { + var hookOrder = []; + it('throw delayed error', (done) => { + setTimeout(() => { + throw new Error('Whoops!'); + }, 10) + setTimeout(done, 10); + }); + it('should wait 15ms', (done) => { + setTimeout(done, 15); + }); + it('test 3', () => { }); + + afterEach(function() { + hookOrder.push(this.currentTest.title); + }); + after(function() { + hookOrder.push('after'); + assert.deepEqual( + hookOrder, + ['throw delayed error', 'should wait 15ms', 'test 3', 'after'] + ); + throw new Error('should get upto here and throw'); + }); +}); diff --git a/test/integration/helpers.js b/test/integration/helpers.js index 78251c986b..0d65e91e6b 100644 --- a/test/integration/helpers.js +++ b/test/integration/helpers.js @@ -143,6 +143,8 @@ module.exports = { invokeMochaAsync: invokeMochaAsync, + invokeNode: invokeNode, + /** * Resolves the path to a fixture to the full path. */ @@ -227,6 +229,19 @@ function invokeMochaAsync(args, opts) { return [mochaProcess, resultPromise]; } +/** + * Invokes Node without Mocha binary with the given arguments, + * when Mocha is used programmatically. + */ +function invokeNode(args, fn, opts) { + if (typeof args === 'function') { + opts = fn; + fn = args; + args = []; + } + return _spawnMochaWithListeners(args, fn, opts); +} + function invokeSubMocha(args, fn, opts) { if (typeof args === 'function') { opts = fn; diff --git a/test/integration/hook-err.spec.js b/test/integration/hook-err.spec.js index 55604851ef..d5fe6e858d 100644 --- a/test/integration/hook-err.spec.js +++ b/test/integration/hook-err.spec.js @@ -194,7 +194,10 @@ describe('hook error handling', function() { run('hooks/before-hook-async-error-tip.fixture.js', onlyErrorTitle()) ); it('should verify results', function() { - expect(lines, 'to equal', ['1) spec 2', '"before all" hook:']); + expect(lines, 'to equal', [ + '1) spec 2', + '"before all" hook for "skipped":' + ]); }); }); diff --git a/test/integration/pending.spec.js b/test/integration/pending.spec.js index 7179ff187b..ae6a57f0ca 100644 --- a/test/integration/pending.spec.js +++ b/test/integration/pending.spec.js @@ -1,9 +1,12 @@ 'use strict'; var assert = require('assert'); -var run = require('./helpers').runMochaJSON; -var runMocha = require('./helpers').runMocha; -var splitRegExp = require('./helpers').splitRegExp; +var helpers = require('./helpers'); +var run = helpers.runMochaJSON; +var runMocha = helpers.runMocha; +var splitRegExp = helpers.splitRegExp; +var invokeNode = helpers.invokeNode; +var toJSONRunResult = helpers.toJSONRunResult; var args = []; describe('pending', function() { @@ -323,4 +326,21 @@ describe('pending', function() { }); }); }); + + describe('programmatic usage', function() { + it('should skip the test by listening to test event', function(done) { + var path = require.resolve('./fixtures/pending/programmatic.fixture.js'); + invokeNode([path], function(err, res) { + if (err) { + return done(err); + } + var result = toJSONRunResult(res); + expect(result, 'to have passed') + .and('to have passed test count', 0) + .and('to have pending test count', 1) + .and('to have pending test order', 'should succeed'); + done(); + }); + }); + }); }); diff --git a/test/integration/uncaught.spec.js b/test/integration/uncaught.spec.js index 7d673b1eaa..5b193280bc 100644 --- a/test/integration/uncaught.spec.js +++ b/test/integration/uncaught.spec.js @@ -17,7 +17,7 @@ describe('uncaught exceptions', function() { assert.strictEqual( res.failures[0].fullTitle, - 'uncaught "before each" hook' + 'uncaught "before each" hook for "test"' ); assert.strictEqual(res.code, 1); done(); @@ -87,6 +87,33 @@ describe('uncaught exceptions', function() { }); }); + it('handles uncaught exceptions within open tests', function(done) { + run('uncaught/recover.fixture.js', args, function(err, res) { + if (err) { + return done(err); + } + + expect( + res, + 'to have failed with error', + 'Whoops!', + 'Whoops!', // JSON reporter does not show the second error message + 'should get upto here and throw' + ) + .and('to have passed test count', 2) + .and('to have failed test count', 3) + .and('to have passed test', 'should wait 15ms', 'test 3') + .and( + 'to have failed test', + 'throw delayed error', + 'throw delayed error', + '"after all" hook for "test 3"' + ); + + done(); + }); + }); + it('removes uncaught exceptions handlers correctly', function(done) { run('uncaught/listeners.fixture.js', args, function(err, res) { if (err) { diff --git a/test/reporters/base.spec.js b/test/reporters/base.spec.js index 18867ae6fa..744b92e69b 100644 --- a/test/reporters/base.spec.js +++ b/test/reporters/base.spec.js @@ -17,13 +17,9 @@ describe('Base reporter', function() { function list(tests) { try { - try { - Base.list(tests); - } finally { - sandbox.restore(); - } - } catch (err) { - throw err; // Rethrow + Base.list(tests); + } finally { + sandbox.restore(); } } @@ -31,13 +27,9 @@ describe('Base reporter', function() { var diffStr; try { - try { - diffStr = Base.generateDiff(actual, expected); - } finally { - sandbox.restore(); - } - } catch (err) { - throw err; // Rethrow + diffStr = Base.generateDiff(actual, expected); + } finally { + sandbox.restore(); } return diffStr; diff --git a/test/reporters/helpers.js b/test/reporters/helpers.js index 76b3d79307..45c4d916de 100644 --- a/test/reporters/helpers.js +++ b/test/reporters/helpers.js @@ -215,16 +215,12 @@ function createRunReporterFunction(ctor) { Object.setPrototypeOf(stubSelf, ctor.prototype); try { - try { - // Invoke reporter - ctor.call(stubSelf, runner, options); - } finally { - // Revert stream reassignment here so reporter output - // can't be corrupted if any test assertions throw - stdoutWriteStub.restore(); - } - } catch (err) { - throw err; // Rethrow + // Invoke reporter + ctor.call(stubSelf, runner, options); + } finally { + // Revert stream reassignment here so reporter output + // can't be corrupted if any test assertions throw + stdoutWriteStub.restore(); } return stdout; diff --git a/test/reporters/nyan.spec.js b/test/reporters/nyan.spec.js index 05d2e1bf77..ce65e97d85 100644 --- a/test/reporters/nyan.spec.js +++ b/test/reporters/nyan.spec.js @@ -192,13 +192,9 @@ describe('Nyan reporter', function() { }; try { - try { - nyanCat.draw.call(fakeThis); - } finally { - sandbox.restore(); - } - } catch (err) { - throw err; // Rethrow + nyanCat.draw.call(fakeThis); + } finally { + sandbox.restore(); } var expectedArray = [ @@ -239,13 +235,9 @@ describe('Nyan reporter', function() { }; try { - try { - nyanCat.draw.call(fakeThis); - } finally { - sandbox.restore(); - } - } catch (err) { - throw err; // Rethrow + nyanCat.draw.call(fakeThis); + } finally { + sandbox.restore(); } var expectedArray = [ @@ -286,13 +278,9 @@ describe('Nyan reporter', function() { var expectedNumber = 25; try { - try { - nyanCat.cursorDown(expectedNumber); - } finally { - sandbox.restore(); - } - } catch (err) { - throw err; // Rethrow + nyanCat.cursorDown(expectedNumber); + } finally { + sandbox.restore(); } var expectedArray = ['\u001b[' + expectedNumber + 'B']; @@ -319,13 +307,9 @@ describe('Nyan reporter', function() { var expectedNumber = 25; try { - try { - nyanCat.cursorUp(expectedNumber); - } finally { - sandbox.restore(); - } - } catch (err) { - throw err; // Rethrow + nyanCat.cursorUp(expectedNumber); + } finally { + sandbox.restore(); } var expectedArray = ['\u001b[' + expectedNumber + 'A']; @@ -495,13 +479,9 @@ describe('Nyan reporter', function() { }; try { - try { - nyanCat.drawScoreboard.call(fakeThis); - } finally { - sandbox.restore(); - } - } catch (err) { - throw err; // Rethrow + nyanCat.drawScoreboard.call(fakeThis); + } finally { + sandbox.restore(); } var expectedArray = [ @@ -532,13 +512,9 @@ describe('Nyan reporter', function() { }; try { - try { - nyanCat.drawScoreboard.call(fakeThis); - } finally { - sandbox.restore(); - } - } catch (err) { - throw err; // Rethrow + nyanCat.drawScoreboard.call(fakeThis); + } finally { + sandbox.restore(); } expect(fakeThis.cursorUp.calledWith(expectedNumberOfLines), 'to be true'); @@ -573,13 +549,9 @@ describe('Nyan reporter', function() { }; try { - try { - nyanCat.drawRainbow.call(fakeThis); - } finally { - sandbox.restore(); - } - } catch (err) { - throw err; // Rethrow + nyanCat.drawRainbow.call(fakeThis); + } finally { + sandbox.restore(); } var expectedArray = [ @@ -607,13 +579,9 @@ describe('Nyan reporter', function() { }; try { - try { - nyanCat.drawRainbow.call(fakeThis); - } finally { - sandbox.restore(); - } - } catch (err) { - throw err; // Rethrow + nyanCat.drawRainbow.call(fakeThis); + } finally { + sandbox.restore(); } expect(expectedCursorArgument, 'to be', expectedNumberOfLines); diff --git a/test/unit/runner.spec.js b/test/unit/runner.spec.js index b3b3a903a5..92b41c5fc4 100644 --- a/test/unit/runner.spec.js +++ b/test/unit/runner.spec.js @@ -3,6 +3,7 @@ var path = require('path'); var sinon = require('sinon'); var Mocha = require('../../lib/mocha'); +var Pending = require('../../lib/pending'); var Suite = Mocha.Suite; var Runner = Mocha.Runner; var Test = Mocha.Test; @@ -12,6 +13,7 @@ var noop = Mocha.utils.noop; var EVENT_HOOK_BEGIN = Runner.constants.EVENT_HOOK_BEGIN; var EVENT_TEST_FAIL = Runner.constants.EVENT_TEST_FAIL; var EVENT_TEST_RETRY = Runner.constants.EVENT_TEST_RETRY; +var EVENT_TEST_END = Runner.constants.EVENT_TEST_END; var EVENT_RUN_END = Runner.constants.EVENT_RUN_END; var STATE_FAILED = Runnable.constants.STATE_FAILED; @@ -147,7 +149,11 @@ describe('Runner', function() { return; } // verify that the prop isn't enumerable - expect(global.propertyIsEnumerable('XMLHttpRequest'), 'to be', false); + expect( + Object.prototype.propertyIsEnumerable.call(global, 'XMLHttpRequest'), + 'to be', + false + ); // create a new runner and keep a reference to the test. var test = new Test('im a test about bears', noop); @@ -156,7 +162,11 @@ describe('Runner', function() { // make the prop enumerable again. global.XMLHttpRequest = noop; - expect(global.propertyIsEnumerable('XMLHttpRequest'), 'to be', true); + expect( + Object.prototype.propertyIsEnumerable.call(global, 'XMLHttpRequest'), + 'to be', + true + ); // verify the test hasn't failed. newRunner.checkGlobals(test); @@ -444,6 +454,13 @@ describe('Runner', function() { }); }); + describe('.runTest(fn)', function() { + it('should return when no tests to run', function() { + runner.test = undefined; + expect(runner.runTest(noop), 'to be undefined'); + }); + }); + describe('allowUncaught', function() { it('should allow unhandled errors to propagate through', function() { var newRunner = new Runner(suite); @@ -690,6 +707,20 @@ describe('Runner', function() { sandbox.stub(runner, 'fail'); }); + describe('when allow-uncaught is set to true', function() { + it('should propagate error and throw', function() { + var err = new Error('should rethrow err'); + runner.allowUncaught = true; + expect( + function() { + runner.uncaught(err); + }, + 'to throw', + 'should rethrow err' + ); + }); + }); + describe('when provided an object argument', function() { describe('when argument is not an Error', function() { var err; @@ -713,6 +744,13 @@ describe('Runner', function() { }); }); + describe('when argument is a Pending', function() { + it('should ignore argument and return', function() { + var err = new Pending(); + expect(runner.uncaught(err), 'to be undefined'); + }); + }); + describe('when argument is an Error', function() { var err; beforeEach(function() { @@ -783,14 +821,10 @@ describe('Runner', function() { runnable.parent = runner.suite; sandbox.stub(runnable, 'clearTimeout'); runner.currentRunnable = runnable; - runner.nextSuite = sandbox.spy(); - }); - - afterEach(function() { - delete runner.nextSuite; }); it('should clear any pending timeouts', function() { + runnable.callback = sandbox.fake(); runner.uncaught(err); expect(runnable.clearTimeout, 'was called times', 1); }); @@ -844,75 +878,35 @@ describe('Runner', function() { }); }); - describe('when the current Runnable is currently running', function() { + describe('when the current Runnable is still running', function() { describe('when the current Runnable is a Test', function() { beforeEach(function() { runnable = new Test('goomba', noop); runnable.parent = runner.suite; runner.currentRunnable = runnable; - sandbox.stub(runner, 'hookUp'); - runner.next = sandbox.spy(); - }); - - afterEach(function() { - delete runner.next; + runnable.callback = sandbox.fake(); }); - it('should fail with the current Runnable and the error', function() { + it('should run callback(err) to handle failing and hooks', function() { runner.uncaught(err); - expect(runner.fail, 'to have all calls satisfying', [ - expect.it('to be', runnable), + expect(runner.fail, 'was not called'); + expect(runnable.callback, 'to have all calls satisfying', [ err ]).and('was called once'); }); - it('should notify test has ended', function() { - expect( - function() { - runner.uncaught(err); - }, - 'to emit from', - runner, - 'test end', - runnable - ); - }); - - it('should not notify run has ended', function() { + it('should not notify test has ended', function() { expect( function() { runner.uncaught(err); }, 'not to emit from', runner, - 'end' + EVENT_TEST_END ); }); - it('should call any remaining "after each" hooks', function() { - runner.uncaught(err); - expect(runner.hookUp, 'to have all calls satisfying', [ - 'afterEach', - expect.it('to be', runner.next) - ]).and('was called once'); - }); - }); - - describe('when the current Runnable is a "before all" or "after all" hook', function() { - beforeEach(function() { - runnable = new Hook('', noop); - runnable.parent = runner.suite; - runner.currentRunnable = runnable; - }); - - it('should continue to the next suite', function() { - runner.uncaught(err); - expect(runner.nextSuite, 'to have all calls satisfying', [ - runner.suite - ]).and('was called once'); - }); - it('should not notify run has ended', function() { expect( function() { @@ -920,64 +914,38 @@ describe('Runner', function() { }, 'not to emit from', runner, - 'end' + EVENT_RUN_END ); }); }); - describe('when the current Runnable is a "before each" hook', function() { + describe('when the current Runnable is a Hook', function() { beforeEach(function() { - runnable = new Hook('before each', noop); + runnable = new Hook(); runnable.parent = runner.suite; runner.currentRunnable = runnable; - runner.hookErr = sandbox.spy(); - }); - - afterEach(function() { - delete runner.hookErr; + runnable.callback = sandbox.fake(); }); - it('should associate its failure with the current test', function() { + it('should run callback(err) to handle failing hook pattern', function() { runner.uncaught(err); - expect(runner.hookErr, 'to have all calls satisfying', [ - err, - runner.suite, - false + + expect(runner.fail, 'was not called'); + expect(runnable.callback, 'to have all calls satisfying', [ + err ]).and('was called once'); }); - it('should not notify run has ended', function() { + it('should not notify test has ended', function() { expect( function() { runner.uncaught(err); }, 'not to emit from', runner, - 'end' + EVENT_TEST_END ); }); - }); - - describe('when the current Runnable is an "after each" hook', function() { - beforeEach(function() { - runnable = new Hook('after each', noop); - runnable.parent = runner.suite; - runner.currentRunnable = runnable; - runner.hookErr = sandbox.spy(); - }); - - afterEach(function() { - delete runner.hookErr; - }); - - it('should associate its failure with the current test', function() { - runner.uncaught(err); - expect(runner.hookErr, 'to have all calls satisfying', [ - err, - runner.suite, - true - ]).and('was called once'); - }); it('should not notify run has ended', function() { expect( @@ -986,7 +954,7 @@ describe('Runner', function() { }, 'not to emit from', runner, - 'end' + EVENT_RUN_END ); }); });