Skip to content

Commit 4ed0186

Browse files
dependency: upgrade mocha to 7.2.0 (#31423)
* dependency: upgrade mocha to 7.2.0 * changelog entry * remove the it.only from the mocha patch changelog that is triggering our stop-only check from passing * skip patches folder with stop-only check * remove extra bracket * Update protocol_spec to reflect new mocha line number for error stack trace
1 parent a459591 commit 4ed0186

File tree

6 files changed

+158
-128
lines changed

6 files changed

+158
-128
lines changed

cli/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ _Released 4/8/2025 (PENDING)_
1616

1717
**Dependency Updates:**
1818

19-
- Upgraded `mocha` from `7.0.1` to `7.1.2`. Addressed in [#31416](https://github.com/cypress-io/cypress/pull/31416).
19+
- Upgraded `mocha` from `7.0.1` to `7.2.0`. Addressed in [#31423](https://github.com/cypress-io/cypress/pull/31423).
2020
- Upgraded `webdriver` from `9.7.3` to `9.11.0`. Addressed in [#31315](https://github.com/cypress-io/cypress/pull/31315).
2121
- Upgraded `win-version-info` from `5.0.1` to `6.0.1`. Addressed in [#31358](https://github.com/cypress-io/cypress/pull/31358).
2222

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"sanitize:mocha:results": "node ./scripts/sanitize-mocha-results.js",
5353
"prestart": "yarn ensure-deps",
5454
"start": "cypress open --dev --global",
55-
"stop-only": "npx stop-only --skip .cy,.publish,.projects,node_modules,dist,dist-test,fixtures,lib,bower_components,src,__snapshots__ --exclude cypress-tests.ts,*only.cy.js",
55+
"stop-only": "npx stop-only --skip .cy,.publish,.projects,node_modules,dist,dist-test,fixtures,lib,bower_components,src,__snapshots__,patches --exclude cypress-tests.ts,*only.cy.js",
5656
"stop-only-all": "yarn stop-only --folder packages",
5757
"pretest": "yarn ensure-deps",
5858
"test": "yarn lerna exec yarn test --scope=cypress --scope=@packages/{config,data-context,driver,electron,errors,extension,https-proxy,launcher,net-stubbing,network,packherd-require,proxy,rewriter,scaffold-config,socket,v8-snapshot-require,telemetry} --scope=@tooling/{electron-mksnapshot,v8-snapshot}",

packages/driver/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"methods": "1.1.2",
7878
"mime": "^3.0.0",
7979
"minimatch": "3.1.2",
80-
"mocha": "7.1.2",
80+
"mocha": "7.2.0",
8181
"multer": "1.4.4",
8282
"ordinal": "1.0.3",
8383
"react-15.6.1": "npm:[email protected]",

packages/driver/patches/mocha+7.1.2.dev.patch renamed to packages/driver/patches/mocha+7.2.0.dev.patch

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,40 @@
11
diff --git a/node_modules/mocha/CHANGELOG.md b/node_modules/mocha/CHANGELOG.md
22
deleted file mode 100644
3-
index c3b33f1..0000000
3+
index 71ef0fc..0000000
44
--- a/node_modules/mocha/CHANGELOG.md
55
+++ /dev/null
6-
@@ -1,634 +0,0 @@
6+
@@ -1,665 +0,0 @@
7+
-# 7.2.0 / 2020-05-22
8+
-
9+
-## :tada: Enhancements
10+
-
11+
-- [#4234](https://github.com/mochajs/mocha/issues/4234): Add ability to run tests in a mocha instance multiple times ([**@nicojs**](https://github.com/nicojs))
12+
-- [#4219](https://github.com/mochajs/mocha/issues/4219): Exposing filename in JSON, doc, and json-stream reporters ([**@Daniel0113**](https://github.com/Daniel0113))
13+
-- [#4244](https://github.com/mochajs/mocha/issues/4244): Add Root Hook Plugins ([**@boneskull**](https://github.com/boneskull))
14+
-
15+
-## :bug: Fixes
16+
-
17+
-- [#4258](https://github.com/mochajs/mocha/issues/4258): Fix missing dot in name of configuration file ([**@sonicdoe**](https://github.com/sonicdoe))
18+
-- [#4194](https://github.com/mochajs/mocha/issues/4194): Check if module.paths really exists ([**@ematipico**](https://github.com/ematipico))
19+
-- [#4256](https://github.com/mochajs/mocha/issues/4256): `--forbid-only` does not recognize `it.only` when `before` crashes ([**@arvidOtt**](https://github.com/arvidOtt))
20+
-- [#4152](https://github.com/mochajs/mocha/issues/4152): Bug with multiple async done() calls ([**@boneskull**](https://github.com/boneskull))
21+
-- [#4275](https://github.com/mochajs/mocha/issues/4275): Improper warnings for invalid reporters ([**@boneskull**](https://github.com/boneskull))
22+
-- [#4288](https://github.com/mochajs/mocha/issues/4288): Broken hook.spec.js test for IE11 ([**@boneskull**](https://github.com/boneskull))
23+
-
24+
-## :book: Documentation
25+
-
26+
-- [#4081](https://github.com/mochajs/mocha/issues/4081): Insufficient white space for API docs in view on mobile ([**@HyunSangHan**](https://github.com/HyunSangHan))
27+
-- [#4255](https://github.com/mochajs/mocha/issues/4255): Update mocha-docdash for UI fixes on API docs ([**@craigtaub**](https://github.com/craigtaub))
28+
-- [#4235](https://github.com/mochajs/mocha/issues/4235): Enable emoji on website; enable normal ul elements ([**@boneskull**](https://github.com/boneskull))
29+
-- [#4272](https://github.com/mochajs/mocha/issues/4272): Fetch sponsors at build time, show ALL non-skeevy sponsors ([**@boneskull**](https://github.com/boneskull))
30+
-
31+
-## :nut_and_bolt: Other
32+
-
33+
-- [#4249](https://github.com/mochajs/mocha/issues/4249): Refactoring improving encapsulation ([**@arvidOtt**](https://github.com/arvidOtt))
34+
-- [#4242](https://github.com/mochajs/mocha/issues/4242): CI add job names, add Node.js v14 to matrix ([**@boneskull**](https://github.com/boneskull))
35+
-- [#4237](https://github.com/mochajs/mocha/issues/4237): Refactor validatePlugins to throw coded errors ([**@boneskull**](https://github.com/boneskull))
36+
-- [#4236](https://github.com/mochajs/mocha/issues/4236): Better debug output ([**@boneskull**](https://github.com/boneskull))
37+
-
738
-# 7.1.2 / 2020-04-26
839
-
940
-## :nut_and_bolt: Other
@@ -552,7 +583,7 @@ index c3b33f1..0000000
552583
-
553584
-- [#3226](https://github.com/mochajs/mocha/issues/3226): Do not swallow errors that are thrown asynchronously from passing tests ([@boneskull](https://github.com/boneskull)). Example:
554585
-
555-
- \```js
586+
- \`\`\`js
556587
- it('should actually fail, sorry!', function (done) {
557588
- // passing assertion
558589
- assert(true === true);
@@ -565,7 +596,7 @@ index c3b33f1..0000000
565596
- throw new Error('chaos!');
566597
- }, 100);
567598
- });
568-
- \```
599+
- \`\`\`
569600
-
570601
- Previously to this version, Mocha would have _silently swallowed_ the `chaos!` exception, and you wouldn't know. Well, _now you know_. Mocha cannot recover from this gracefully, so it will exit with a nonzero code.
571602
-
@@ -758,23 +789,23 @@ deleted file mode 100644
758789
index b3623a5..0000000
759790
Binary files a/node_modules/mocha/assets/growl/ok.png and /dev/null differ
760791
diff --git a/node_modules/mocha/lib/mocha.js b/node_modules/mocha/lib/mocha.js
761-
index 740e1fd..0cd2769 100644
792+
index 1983690..ee096a3 100644
762793
--- a/node_modules/mocha/lib/mocha.js
763794
+++ b/node_modules/mocha/lib/mocha.js
764-
@@ -904,7 +904,7 @@ Mocha.prototype.run = function(fn) {
765-
options.files = this.files;
766-
var runner = new exports.Runner(suite, options.delay);
795+
@@ -1014,7 +1014,7 @@ Mocha.prototype.run = function(fn) {
796+
cleanReferencesAfterRun: this._cleanReferencesAfterRun
797+
});
767798
createStatsCollector(runner);
768799
- var reporter = new this._reporter(runner, options);
769800
+ var reporter = this._reporter(runner, options);
770801
runner.checkLeaks = options.checkLeaks === true;
771802
runner.fullStackTrace = options.fullTrace;
772803
runner.asyncOnly = options.asyncOnly;
773804
diff --git a/node_modules/mocha/lib/runner.js b/node_modules/mocha/lib/runner.js
774-
index 25c03b9..f71c992 100644
805+
index 20a6af2..2123646 100644
775806
--- a/node_modules/mocha/lib/runner.js
776807
+++ b/node_modules/mocha/lib/runner.js
777-
@@ -677,9 +677,43 @@ Runner.prototype.runTests = function(suite, fn) {
808+
@@ -755,9 +755,42 @@ Runner.prototype.runTests = function(suite, fn) {
778809
}
779810
self.emit(constants.EVENT_TEST_END, test);
780811
return self.hookUp(HOOK_TYPE_AFTER_EACH, next);
@@ -814,13 +845,12 @@ index 25c03b9..f71c992 100644
814845
+
815846
var retry = test.currentRetry();
816847
- if (retry < test.retries()) {
817-
+
818848
+ // requeue the test if we have retries and haven't satisfied our retry configuration.
819849
+ if (retry < test.retries() && testStatusInfo.shouldAttemptsContinue) {
820850
var clonedTest = test.clone();
821851
clonedTest.currentRetry(retry + 1);
822852
tests.unshift(clonedTest);
823-
@@ -689,8 +723,25 @@ Runner.prototype.runTests = function(suite, fn) {
853+
@@ -767,8 +800,25 @@ Runner.prototype.runTests = function(suite, fn) {
824854
// Early return + hook trigger so that it doesn't
825855
// increment the count wrong
826856
return self.hookUp(HOOK_TYPE_AFTER_EACH, next);

0 commit comments

Comments
 (0)