☕️ Classic, reliable, trusted test framework for Node.js and the browser
chore(deps): update dependency prettier to v3.8.1 (#5709)
renovate[bot]2f98cfd1e3e9
diff --git a/lib/nodejs/parallel-buffered-runner.js b/lib/nodejs/parallel-buffered-runner.jsindex be6f59d7..94b36c56 100644--- a/lib/nodejs/parallel-buffered-runner.js+++ b/lib/nodejs/parallel-buffered-runner.js@@ -22,9 +22,8 @@ const { createMap, constants } = require("../utils");const { MOCHA_ID_PROP_NAME } = constants;const { createFatalError } = require("../errors");-const DEFAULT_WORKER_REPORTER = require.resolve(- "./reporters/parallel-buffered",-);+const DEFAULT_WORKER_REPORTER =+ require.resolve("./reporters/parallel-buffered");/*** List of options to _not_ serialize for transmission to workersdiff --git a/package-lock.json b/package-lock.jsonindex b9bbcbcb..c6acf46b 100644--- a/package-lock.json+++ b/package-lock.json@@ -61,7 +61,7 @@"knip": "^5.61.3","npm-run-all2": "^8.0.0","nyc": "^17.1.0",- "prettier": "3.6.2",+ "prettier": "3.8.1","ps-list": "^9.0.0","remark": "^14.0.2","remark-github": "^11.2.2",@@ -13819,9 +13819,9 @@}},"node_modules/prettier": {- "version": "3.6.2",- "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz",- "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",+ "version": "3.8.1",+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz",+ "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==","dev": true,"license": "MIT","bin": {diff --git a/package.json b/package.jsonindex 746a99f1..dbdd15f0 100644--- a/package.json+++ b/package.json@@ -138,7 +138,7 @@"knip": "^5.61.3","npm-run-all2": "^8.0.0","nyc": "^17.1.0",- "prettier": "3.6.2",+ "prettier": "3.8.1","ps-list": "^9.0.0","remark": "^14.0.2","remark-github": "^11.2.2",diff --git a/test/integration/multiple-runs.spec.js b/test/integration/multiple-runs.spec.jsindex cfaa4182..5d293e5f 100644--- a/test/integration/multiple-runs.spec.js+++ b/test/integration/multiple-runs.spec.js@@ -4,9 +4,8 @@ const { invokeNode } = require("./helpers");describe("multiple runs", function () {it("should be allowed to run multiple times if cleanReferences is turned off", function (done) {- var path = require.resolve(- "./fixtures/multiple-runs/run-thrice.fixture.js",- );+ var path =+ require.resolve("./fixtures/multiple-runs/run-thrice.fixture.js");invokeNode([path], function (err, res) {if (err) {done(err);@@ -29,9 +28,8 @@ describe("multiple runs", function () {});it("should not be allowed if cleanReferences is true", function (done) {- var path = require.resolve(- "./fixtures/multiple-runs/clean-references.fixture.js",- );+ var path =+ require.resolve("./fixtures/multiple-runs/clean-references.fixture.js");invokeNode([path],function (err, res) {@@ -68,9 +66,8 @@ describe("multiple runs", function () {});it("should not be allowed to run while a previous run is in progress", function (done) {- var path = require.resolve(- "./fixtures/multiple-runs/start-second-run-if-previous-is-still-running.fixture",- );+ var path =+ require.resolve("./fixtures/multiple-runs/start-second-run-if-previous-is-still-running.fixture");invokeNode([path],function (err, res) {@@ -86,9 +83,8 @@ describe("multiple runs", function () {});it("should reset the hooks between runs", function (done) {- var path = require.resolve(- "./fixtures/multiple-runs/multiple-runs-with-flaky-before-each.fixture",- );+ var path =+ require.resolve("./fixtures/multiple-runs/multiple-runs-with-flaky-before-each.fixture");invokeNode([path], function (err, res) {expect(err, "to be null");expect(res.code, "to be", 0);diff --git a/test/integration/plugins/root-hooks.spec.js b/test/integration/plugins/root-hooks.spec.jsindex 9aa234d4..4fe0bcdc 100644--- a/test/integration/plugins/root-hooks.spec.js+++ b/test/integration/plugins/root-hooks.spec.js@@ -36,16 +36,10 @@ describe("root hooks", function () {return expect(runMochaForHookOutput(["--require=" +- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-defs-a.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-defs-a.fixture.js"),"--require=" +- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-defs-b.fixture.js",- ),- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-test.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-defs-b.fixture.js"),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-test.fixture.js"),]),"to be fulfilled with",[@@ -69,16 +63,10 @@ describe("root hooks", function () {return expect(runMochaForHookOutput(["--require=" +- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-defs-c.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-defs-c.fixture.js"),"--require=" +- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-defs-d.fixture.js",- ),- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-test.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-defs-d.fixture.js"),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-test.fixture.js"),]),"to be fulfilled with",[@@ -117,9 +105,7 @@ describe("root hooks", function () {// mixed with commonjs"../fixtures/plugins/root-hooks/root-hook-defs-a.fixture.js",),- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-test.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-test.fixture.js"),]),"to be fulfilled with",[@@ -246,17 +232,11 @@ describe("root hooks", function () {return expect(runMochaForHookOutput(["--require=" +- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-defs-a.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-defs-a.fixture.js"),"--require=" +- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-defs-b.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-defs-b.fixture.js"),"--parallel",- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-test.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-test.fixture.js"),]),"to be fulfilled with",[@@ -280,17 +260,11 @@ describe("root hooks", function () {return expect(runMochaForHookOutput(["--require=" +- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-defs-c.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-defs-c.fixture.js"),"--require=" +- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-defs-d.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-defs-d.fixture.js"),"--parallel",- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-test.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-test.fixture.js"),]),"to be fulfilled with",[@@ -315,20 +289,12 @@ describe("root hooks", function () {return expect(runMochaForHookOutput(["--require=" +- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-defs-a.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-defs-a.fixture.js"),"--require=" +- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-defs-b.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-defs-b.fixture.js"),"--parallel",- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-test.fixture.js",- ),- require.resolve(- "../fixtures/plugins/root-hooks/root-hook-test-2.fixture.js",- ),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-test.fixture.js"),+ require.resolve("../fixtures/plugins/root-hooks/root-hook-test-2.fixture.js"),]),"to be fulfilled with",[diff --git a/test/node-unit/mocha.spec.js b/test/node-unit/mocha.spec.jsindex 50603f2e..4b79aace 100644--- a/test/node-unit/mocha.spec.js+++ b/test/node-unit/mocha.spec.js@@ -6,9 +6,8 @@ const sinon = require("sinon");const { EventEmitter } = require("node:events");const DUMB_FIXTURE_PATH = require.resolve("./fixtures/dumb-module.fixture.js");-const DUMBER_FIXTURE_PATH = require.resolve(- "./fixtures/dumber-module.fixture.js",-);+const DUMBER_FIXTURE_PATH =+ require.resolve("./fixtures/dumber-module.fixture.js");describe("Mocha", function () {let stubs;diff --git a/test/unit/mocha.spec.js b/test/unit/mocha.spec.jsindex 6eca3bcb..511ce653 100644--- a/test/unit/mocha.spec.js+++ b/test/unit/mocha.spec.js@@ -208,9 +208,11 @@ describe("Mocha", function () {describe("when `enableGlobalTeardown` option is present", function () {it("should configure global teardown fixtures", function () {const mocha = new Mocha({ enableGlobalTeardown: 1 });- expect(mocha.enableGlobalTeardown, "to have a call satisfying", [- 1,- ]).and("was called once");+ expect(+ mocha.enableGlobalTeardown,+ "to have a call satisfying",+ [1],+ ).and("was called once");});});});