Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mochajs/mocha
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v9.2.2
Choose a base ref
...
head repository: mochajs/mocha
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v11.1.0
Choose a head ref
Loading
Showing with 22,902 additions and 40,949 deletions.
  1. +1 −2 .browserslistrc
  2. +0 −14 .eslintignore
  3. +0 −103 .eslintrc.yml
  4. +43 −34 .github/CODE_OF_CONDUCT.md
  5. +100 −61 .github/CONTRIBUTING.md
  6. +18 −0 .github/DEVELOPMENT.md
  7. +47 −0 .github/ISSUE_TEMPLATE/01-bug.yml
  8. +27 −0 .github/ISSUE_TEMPLATE/02-documentation.yml
  9. +39 −0 .github/ISSUE_TEMPLATE/03-feature-request.yml
  10. +31 −0 .github/ISSUE_TEMPLATE/04-repository-tooling.yml
  11. +0 −68 .github/ISSUE_TEMPLATE/bug_report.md
  12. +14 −0 .github/ISSUE_TEMPLATE/config.yml
  13. +0 −18 .github/ISSUE_TEMPLATE/feature_request.md
  14. +0 −15 .github/ISSUE_TEMPLATE/support-question.md
  15. +9 −36 .github/PULL_REQUEST_TEMPLATE.md
  16. +10 −0 .github/dependabot.yml
  17. +25 −0 .github/release-please/config.json
  18. +1 −0 .github/release-please/manifest.json
  19. +17 −27 .github/workflows/browser-test.yml
  20. +23 −0 .github/workflows/compliance.yml
  21. +0 −20 .github/workflows/delete-runs.yml
  22. +81 −186 .github/workflows/mocha.yml
  23. +6 −1 .github/workflows/nightly-site-deploy.yml
  24. +84 −0 .github/workflows/npm-script.yml
  25. +49 −0 .github/workflows/release-please.yml
  26. +0 −25 .github/workflows/stale.yml
  27. +1 −2 .gitignore
  28. +40 −0 .knip.jsonc
  29. +0 −1 .mocharc.yml
  30. +39 −0 AUTHORS
  31. +482 −188 CHANGELOG.md
  32. +16 −0 FUNDING.md
  33. +1 −1 LICENSE
  34. +176 −122 MAINTAINERS.md
  35. +4 −4 PROJECT_CHARTER.md
  36. +29 −25 README.md
  37. +7 −0 SECURITY.md
  38. BIN assets/growl/error.png
  39. BIN assets/growl/ok.png
  40. 0 bin/{mocha → mocha.js}
  41. +2 −2 browser-entry.js
  42. +3 −3 docs/API.md
  43. +4 −32 docs/README.md
  44. +24 −20 docs/_data/supporters.js
  45. +2 −2 docs/_data/usage.js
  46. +1 −1 docs/_includes/default.liquid
  47. +4 −4 docs/_includes/supporters.md
  48. +1 −1 docs/api-tutorials/custom-reporter.md
  49. +1 −1 docs/changelogs/CHANGELOG_V3_older.md
  50. +1 −1 docs/changelogs/README.md
  51. +4 −2 docs/css/style.css
  52. +14 −7 docs/css/supporters.css
  53. +1 −1 docs/example/tests.html
  54. BIN docs/images/emacs.png
  55. BIN docs/images/jetbrains-plugin.png
  56. +1 −1 docs/images/join-chat.svg
  57. BIN docs/images/matomo-logo.png
  58. BIN docs/images/mocha_side_bar.png
  59. BIN docs/images/reporter-dot.png
  60. BIN docs/images/test-duration-range.png
  61. BIN docs/images/wallaby-logo.png
  62. BIN docs/images/wallaby.png
  63. +97 −134 docs/index.md
  64. +157 −0 eslint.config.js
  65. +17 −42 karma.conf.js
  66. +0 −328 karma_no-ie11.conf.js
  67. +0 −169 lib/browser/growl.js
  68. +0 −123 lib/browser/progress.js
  69. +10 −6 lib/cli/cli.js
  70. +53 −8 lib/cli/collect-files.js
  71. +6 −5 lib/cli/commands.js
  72. +12 −2 lib/cli/lookup-files.js
  73. +105 −29 lib/cli/options.js
  74. +76 −15 lib/cli/run-helpers.js
  75. +22 −2 lib/cli/run-option-metadata.js
  76. +10 −9 lib/cli/run.js
  77. +2 −2 lib/cli/watch-run.js
  78. +9 −9 lib/interfaces/bdd.js
  79. +4 −4 lib/interfaces/common.js
  80. +4 −4 lib/interfaces/qunit.js
  81. +9 −9 lib/interfaces/tdd.js
  82. +26 −54 lib/mocha.js
  83. +56 −74 lib/nodejs/esm-utils.js
  84. +0 −137 lib/nodejs/growl.js
  85. +13 −13 lib/nodejs/parallel-buffered-runner.js
  86. +1 −1 lib/nodejs/reporters/parallel-buffered.js
  87. +14 −12 lib/nodejs/serializer.js
  88. +60 −19 lib/reporters/base.js
  89. +67 −37 lib/reporters/html.js
  90. +1 −1 lib/reporters/json-stream.js
  91. +1 −1 lib/reporters/markdown.js
  92. +22 −31 lib/reporters/nyan.js
  93. +1 −0 lib/reporters/xunit.js
  94. +5 −7 lib/runnable.js
  95. +27 −26 lib/runner.js
  96. +5 −5 lib/suite.js
  97. +64 −6 lib/utils.js
  98. +183 −53 mocha.css
  99. +3 −3 netlify.toml
  100. +19,260 −37,762 package-lock.json
  101. +0 −312 package-scripts.js
  102. +93 −87 package.json
  103. +2 −23 rollup.config.js
  104. +0 −46 rollup_no-ie11.config.js
  105. +6 −6 scripts/karma-rollup-plugin.js
  106. +0 −126 scripts/netlify-headers.js
  107. +6 −6 test/assertions.js
  108. +0 −3 test/browser-specific/fixtures/requirejs/lib.fixture.js
  109. +0 −9 test/browser-specific/fixtures/requirejs/main.fixture.js
  110. +1 −1 test/browser-specific/fixtures/webpack/webpack.config.js
  111. +0 −17 test/browser-specific/requirejs-setup.js
  112. +1 −1 test/integration/README.md
  113. +1 −1 test/integration/compiler-globbing.spec.js
  114. +0 −6 test/integration/diffs.spec.js
  115. +7 −0 test/integration/fixtures/collect-files.fixture.mjs
  116. +9 −0 test/integration/fixtures/failing-sync.fixture.js
  117. +3 −0 test/integration/fixtures/options/timeout-unref.fixture.js
  118. +10 −0 test/integration/fixtures/parallel/circular-error-array.mjs
  119. +15 −0 test/integration/fixtures/parallel/circular-error-object.mjs
  120. +15 −0 test/integration/fixtures/parallel/getter-error-object.mjs
  121. +5 −0 test/integration/fixtures/parallel/non-circular-error.mjs
  122. +2 −13 test/integration/glob.spec.js
  123. +8 −2 test/integration/helpers.js
  124. +0 −6 test/integration/no-diff.spec.js
  125. +1 −1 test/integration/options/compilers.spec.js
  126. +2 −2 test/integration/options/extension.spec.js
  127. +83 −3 test/integration/options/file.spec.js
  128. +9 −3 test/integration/options/ignore.spec.js
  129. +40 −0 test/integration/options/passOnFailingTestSuite.spec.js
  130. +11 −0 test/integration/options/timeout.spec.js
  131. +53 −0 test/integration/parallel.spec.js
  132. +40 −16 test/integration/plugins/root-hooks.spec.js
  133. +3 −3 test/integration/reporters.spec.js
  134. +27 −0 test/node-unit/cli/mocha-flags.spec.js
  135. +185 −5 test/node-unit/cli/options.spec.js
  136. +1 −1 test/node-unit/cli/run.spec.js
  137. +46 −0 test/node-unit/esm-utils.spec.js
  138. +19 −0 test/node-unit/mocha.spec.js
  139. +20 −0 test/node-unit/utils.spec.js
  140. +102 −0 test/reporters/base.spec.js
  141. +6 −6 test/reporters/helpers.js
  142. +5 −5 test/reporters/nyan.spec.js
  143. +12 −1 test/reporters/xunit.spec.js
  144. +3 −3 test/unit/errors.spec.js
  145. +22 −40 test/unit/mocha.spec.js
  146. +1 −0 test/unit/runnable.spec.js
  147. +34 −10 test/unit/runner.spec.js
  148. +33 −0 test/unit/throw.spec.js
  149. +26 −0 test/unit/timeout.spec.js
  150. +49 −12 test/unit/utils.spec.js
3 changes: 1 addition & 2 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node >= 12
node >= 14
last 2 Chrome versions
last 2 Edge versions
last 2 Firefox versions
@@ -9,4 +9,3 @@ unreleased Edge versions
unreleased Firefox versions
unreleased Safari versions
unreleased Opera versions
IE 11
14 changes: 0 additions & 14 deletions .eslintignore

This file was deleted.

103 changes: 0 additions & 103 deletions .eslintrc.yml

This file was deleted.

77 changes: 43 additions & 34 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -3,35 +3,36 @@
## Be friendly and patient

We understand that everyone has different levels of experience or knowledge in many diverse fields, be it technical or
non-technical in nature. We also have areas of knowledge we are eager to expand; we want to be a community where people
can not only contribute, but feel comfortable to ask questions as well and learn along the way. If someone says something
wrong, or says something accidentally offensive, respond with patience and try to keep it polite and civil. Remember that
we all were newbies at one point.
non-technical in nature.
We also have areas of knowledge we are eager to expand; we want to be a community where people can not only contribute, but feel comfortable to ask questions as well and learn along the way.
If someone says something wrong, or says something accidentally offensive, respond with patience and try to keep it polite and civil.
Remember that we all were newbies at one point.

## Be welcoming

We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not
limited to, members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class,
educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief,
religion, and mental and physical ability.
We strive to be a community that welcomes and supports people of all backgrounds and identities.
This includes, but is not limited to, members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.

## Be considerate

Your work will be used by other people, and you in turn will depend on the work of others. Any decision you make will affect
users and colleagues, and you should take those consequences into account when making decisions. Remember that we’re a world-wide
community, so you might not be communicating in someone else’s primary language.
Your work will be used by other people, and you in turn will depend on the work of others.
Any decision you make will affect users and colleagues, and you should take those consequences into account when making decisions.
Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language.

## Be respectful

Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all
experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important
to remember that a community where people feel uncomfortable or threatened is not a productive one. Members of the JS Foundation
community should be respectful when dealing with other members as well as with people outside the JS Foundation community.
Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners.
We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack.
It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one.
Members of the OpenJS Foundation community should be respectful when dealing with other members as well as with people outside the OpenJS Foundation community.

## Be careful in the words that you choose

We are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put
down other participants. Harassment and other exclusionary behavior aren’t acceptable. This includes, but is not limited to:
We are a community of professionals, and we conduct ourselves professionally.
Be kind to others.
Do not insult or put down other participants.
Harassment and other exclusionary behavior aren’t acceptable.
This includes, but is not limited to:

- Violent threats or language directed against another person.
- Discriminatory jokes and language.
@@ -40,55 +41,63 @@ down other participants. Harassment and other exclusionary behavior aren’t acc
- Personal insults, especially those using racist or sexist terms.
- Unwelcome sexual attention.
- Advocating for, or encouraging, any of the above behavior.
- Repeated harassment of others. In general, if someone asks you to stop, then stop.
- Repeated harassment of others.
In general, if someone asks you to stop, then stop.

## When we disagree, try to understand why

Disagreements, both social and technical, happen all the time and JS Foundation projects are no exception. It is important
that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of the JS
Foundation comes from its varied community, people from a wide range of backgrounds. Different people have different
perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t
forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues
and learning from mistakes.
Disagreements, both social and technical, happen all the time and OpenJS Foundation projects are no exception.
It is important that we resolve disagreements and differing views constructively.
Remember that we’re different.
The strength of the OpenJS Foundation comes from its varied community, people from a wide range of backgrounds.
Different people have different perspectives on issues.
Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong.
Don’t forget that it is human to err and blaming each other doesn’t get us anywhere.
Instead, focus on helping to resolve issues and learning from mistakes.

Original text courtesy of the Speak Up! project and Django Project.

## QUESTIONS?

If you have questions, please see the FAQ. If that doesn’t answer your questions, feel free to email report@lists.openjsf.org.
If you have questions, please see the FAQ.
If that doesn’t answer your questions, feel free to email report@lists.openjsf.org.

# OpenJS Foundation Code of Conduct

The OpenJS Foundation and its member projects use the Contributor
Covenant v1.4.1 as its Code of Conduct. Refer to the following
for the full text:
The OpenJS Foundation and its member projects use the Contributor Covenant v1.4.1 as its Code of Conduct.
Refer to the following for the full text:

- [english](https://www.contributor-covenant.org/version/1/4/code-of-conduct)
- [translations](https://www.contributor-covenant.org/translations)
- [Contributor Covenant v1.4.1 in english](https://www.contributor-covenant.org/version/1/4/code-of-conduct)
- [Contributor Covenant v1.4.1 translations](https://www.contributor-covenant.org/translations)

Refer to the section on reporting and escalation in this document for the specific emails that can be used to report and escalate issues.

## Reporting

### Project Spaces

For reporting issues in spaces related to a member project please use the email provided by the project for reporting. Projects handle CoC issues related to the spaces that they maintain. Projects maintainers commit to:
For reporting issues in spaces related to a member project please use the email provided by the project for reporting.
Projects handle CoC issues related to the spaces that they maintain.
Projects maintainers commit to:

- maintain the confidentiality with regard to the reporter of an incident
- to participate in the path for escalation as outlined in
the section on Escalation when required.

### Foundation Spaces

For reporting issues in spaces managed by the OpenJS Foundation, for example, repositories within the OpenJS organization, use the email `report@lists.openjsf.org`. The Cross Project Council (CPC) is responsible for managing these reports and commits to:
For reporting issues in spaces managed by the OpenJS Foundation, for example, repositories within the OpenJS organization, use the email `report@lists.openjsf.org`.
The Cross Project Council (CPC) is responsible for managing these reports and commits to:

- maintain the confidentiality with regard to the reporter of an incident
- to participate in the path for escalation as outlined in
the section on Escalation when required.

## Escalation

The OpenJS Foundation maintains a Code of Conduct Panel (CoCP). This is a foundation-wide team established to manage escalation when a reporter believes that a report to a member project or the CPC has not been properly handled. In order to escalate to the CoCP send an email to `"coc-escalation@lists.openjsf.org`.
The OpenJS Foundation maintains a Code of Conduct Panel (CoCP).
This is a foundation-wide team established to manage escalation when a reporter believes that a report to a member project or the CPC has not been properly handled.
In order to escalate to the CoCP send an email to `"coc-escalation@lists.openjsf.org`.

For more information, refer to the full
[Code of Conduct governance document](https://github.com/openjs-foundation/cross-project-council/blob/master/FOUNDATION_CODE_OF_CONDUCT_REQUIREMENTS.md).
[Code of Conduct governance document](https://github.com/openjs-foundation/cross-project-council/tree/main/proposals/approved/CODE_OF_CONDUCT).
Loading