diff --git a/packages/cli-repl/src/cli-repl.spec.ts b/packages/cli-repl/src/cli-repl.spec.ts index 316c975d2..71321df7b 100644 --- a/packages/cli-repl/src/cli-repl.spec.ts +++ b/packages/cli-repl/src/cli-repl.spec.ts @@ -2773,19 +2773,19 @@ describe('CliRepl', function () { (process as any).version = actualVersions.node; }); - it('prints a deprecation warning when running on platforms with GLIBC < 2.28, otherwise not', async function () { - for (const { version, deprecated } of [ - { version: '3.0+glibcstring', deprecated: false }, - { version: '2.28.2', deprecated: false }, - { version: '2.28', deprecated: false }, - // This might look like is deprecated but since this is not a valid - // semver even after co-ercion, we don't push warnings for such versions - { version: '1.08', deprecated: false }, - { version: '2.21', deprecated: true }, - { version: '2.21-glibcstring', deprecated: true }, - { version: '2.21.4', deprecated: true }, - { version: '1.3.8', deprecated: true }, - ]) { + for (const { version, deprecated } of [ + { version: '3.0+glibcstring', deprecated: false }, + { version: '2.28.2', deprecated: false }, + { version: '2.28', deprecated: false }, + // This might look like is deprecated but since this is not a valid + // semver even after co-ercion, we don't push warnings for such versions + { version: '1.08', deprecated: false }, + { version: '2.21', deprecated: true }, + { version: '2.21-glibcstring', deprecated: true }, + { version: '2.21.4', deprecated: true }, + { version: '1.3.8', deprecated: true }, + ]) { + it(`prints a deprecation warning when running on platforms with GLIBC < 2.28, otherwise not (version=${version})`, async function () { cliRepl = new CliRepl(cliReplOptions); cliRepl.getGlibcVersion = () => version; await cliRepl.start('', {}); @@ -2803,8 +2803,8 @@ describe('CliRepl', function () { 'Using mongosh on the current operating system is deprecated, and support may be removed in a future release.' ); } - } - }); + }); + } it('does not print a platform unsupported deprecation warning when GLIBC information is not present (non-linux systems)', async function () { cliRepl = new CliRepl(cliReplOptions); @@ -2816,17 +2816,17 @@ describe('CliRepl', function () { ); }); - it('prints a deprecation warning when running with OpenSSL < 3.0.0, otherwise not', async function () { - for (const { version, deprecated } of [ - { version: '4.0.1+uniqssl', deprecated: false }, - { version: '4.0', deprecated: false }, - { version: '3.0+uniqssl', deprecated: false }, - { version: '3.0', deprecated: false }, - { version: '2.21', deprecated: true }, - { version: '2.21-uniqssl', deprecated: true }, - { version: '2.21.4', deprecated: true }, - { version: '1.3.8', deprecated: true }, - ]) { + for (const { version, deprecated } of [ + { version: '4.0.1+uniqssl', deprecated: false }, + { version: '4.0', deprecated: false }, + { version: '3.0+uniqssl', deprecated: false }, + { version: '3.0', deprecated: false }, + { version: '2.21', deprecated: true }, + { version: '2.21-uniqssl', deprecated: true }, + { version: '2.21.4', deprecated: true }, + { version: '1.3.8', deprecated: true }, + ]) { + it(`prints a deprecation warning when running with OpenSSL < 3.0.0, otherwise not (version=${version})`, async function () { delete (process.versions as any).openssl; (process.versions as any).openssl = version; @@ -2845,8 +2845,8 @@ describe('CliRepl', function () { 'Using mongosh with OpenSSL versions lower than 3.0.0 is deprecated, and support may be removed in a future release.' ); } - } - }); + }); + } it('prints a deprecation warning when running on Node.js < 20.0.0', async function () { for (const { version, deprecated } of [